Convert TSV to PDF in Java
Tags: tsv, pdf, aspose, java
Published: 2018-10-05 10:18:59

---
title: Convert TSV to PDF in Java
published: true
description: Convert TSV to PDF in Java
tags: #TSV #PDF #Aspose #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](https://en.wikipedia.org/wiki/Tab-separated_values) is an abbreviation of Tab-separated values because it uses Tab to separate fields in a row.

**Aspose.Cells Info:**

>[Aspose.Cells](https://products.aspose.com/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](https://products.aspose.cloud/cells).

# 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](https://github.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/blob/master/Convert-TSV-to-PDF/sampleConvertTSVToPDF.tsv) inside the code [as shown in this image](https://github.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/blob/master/Convert-TSV-to-PDF/Sample-TSV-file-to-be-converted-to-PDF-formats-using-Aspose.Cells-API.png) 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](https://raw.githubusercontent.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/master/Convert-TSV-to-PDF/Sample-TSV-file-to-be-converted-to-PDF-formats-using-Aspose.Cells-API.png "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.

{% gist https://gist.github.com/AsposeCells/ddd2c5c27dc6b45c2aa46a1c0496a831 %}

The following [screenshot](https://github.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/blob/master/Convert-TSV-to-PDF/Convert-TSV-to-PDF-Directly-using-Aspose.Cells-API.png) shows the [output PDF file generated by the above code](https://github.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/blob/master/Convert-TSV-to-PDF/outputConvertTSVToPDFDirectly.pdf) 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](https://raw.githubusercontent.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/master/Convert-TSV-to-PDF/Convert-TSV-to-PDF-Directly-using-Aspose.Cells-API.png "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.

{% gist https://gist.github.com/AsposeCells/45c5e9b7abe7594759952d6e528520cb %}

The following [screenshot](https://github.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/blob/master/Convert-TSV-to-PDF/Convert-TSV-to-PDF-with-One-Page-Per-Sheet-option-using-Aspose.Cells-API.png) shows the [output PDF file generated by the above code](https://github.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/blob/master/Convert-TSV-to-PDF/outputConvertTSVToPDFWithOnePagePerSheetOption.pdf) 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](https://raw.githubusercontent.com/AsposeCells/AsposeCells-Screenshots-and-Sample-Files/master/Convert-TSV-to-PDF/Convert-TSV-to-PDF-with-One-Page-Per-Sheet-option-using-Aspose.Cells-API.png "Convert TSV to PDF with One Page Per Sheet option using Aspose.Cells API")

# See also

* [Opening Files with Different Formats](https://docs.aspose.com/display/cellsjava/Opening+Files+with+Different+Formats)
* [Converting Workbook to Different Formats](https://docs.aspose.com/display/cellsjava/Converting+Workbook+to+Different+Formats)
* [Forum -  Aspose.Cells Product Family](https://forum.aspose.com/c/cells)