DEV Community

AsposeCells
AsposeCells

Posted on • Updated on

Convert TSV to PDF in C#.NET

Aspose.Cells is capable of loading TSV file and converting it to PDF with diverse options. In this article, we will explain how C# or .NET developers can use Aspose.Cells for .NET 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 all .NET frameworks e.g. .NET 2.0, .NET 3.5, .NET 4.0, .NET 7.0, .NET Core, .NET Standard 2.0, Xamarin and can be used to develop both ASP.NET web sites and Windows Forms application. It is also available in other platforms e.g. 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)