DEV Community

AsposeCells
AsposeCells

Posted on • Edited on

3

Convert TSV to PDF in Java

Aspose.Cells is capable of loading TSV file and converting it to PDF with diverse options. In this article, we will explain how Java developers can use Aspose.Cells API to convert TSV to PDF ...

  • Directly
  • With One Page Per Sheet Option

TSV Info:

TSV file is an abbreviation of Tab-separated values because it uses Tab to separate fields in a row.

Aspose.Cells Info:

Aspose.Cells API supports number of platform e.g. .NET, Java, C++, Android, JavaScript, PHP etc. Besides, Aspose.Cells is available in Cloud as REST or RESTful APIs.

Sample TSV File

You can try the code given in this article with any TSV file. But for illustration purpose, we use this sample TSV file inside the code as shown in this image for your reference.

Caption: Sample TSV file to be converted to PDF formats using Aspose.Cells API

Sample TSV file to be converted to PDF formats using Aspose.Cells API

Convert TSV to PDF Directly

The following sample code loads the sample TSV file as shown earlier and converts it to PDF directly.

The following screenshot shows the output PDF file generated by the above code for your reference. As you can see inside the screenshot, output PDF has two pages. If you want to render everything on a single PDF page, you can use One Page Per Sheet option that will be explained soon.

Caption: Convert TSV to PDF Directly using Aspose.Cells API

Convert TSV to PDF Directly using Aspose.Cells API

Convert TSV to PDF with One Page Per Sheet option

The following sample code loads the sample TSV file and converts it to PDF with One Page Per Sheet option specified using the PdfSaveOptions class.

The following screenshot shows the output PDF file generated by the above code for your reference. As you can see inside the screenshot, the entire TSV contents are rendered on a single PDF page.

Caption: Convert TSV to PDF with One Page Per Sheet option using Aspose.Cells API

Convert TSV to PDF with One Page Per Sheet option using Aspose.Cells API

See also

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay