Convert TSV to PDF in C++
Tags: tsv, pdf, aspose, cpp
Published: 2018-10-05 10:19:37

---
title: Convert TSV to PDF in C++
published: true
description: Convert TSV to PDF in C++
tags: #TSV #PDF #Aspose #CPP
---
Aspose.Cells is capable of loading TSV file and converting it to PDF with diverse options. In this article, we will explain how C++ 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/81b7f67b11b45e09cf7acaf9c3cea526 %}

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/b0a49b98b8031e3699a87c0ebfb7eb79 %}

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](https://docs.aspose.com/display/cellscpp/Opening+Files)
* [Saving Files](https://docs.aspose.com/display/cellscpp/Saving+Files)
* [Forum -  Aspose.Cells Product Family](https://forum.aspose.com/c/cells)