DEV Community

AsposeCells
AsposeCells

Posted on • Edited on

Convert TSV to PDF in C++

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 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

Top comments (0)