How to create Adobe PDF files in .NET
The easiest way to create PDF documents is the usage of TX Text Control - a word processing and reporting library to create documents programmatically.

Creating PDF files is often a tricky part of a business process. There are many ways to create PDF documents in VB.NET or C#. One of it is to use a PDF printer driver such as the Microsoft Print to PDF feature. But they are mostly not build for being automated or integrated into applications. The second problem with this approach is that you still have to create a document somehow to print it. You could create a PrintDocument in .NET and position strings using GDI on a virtual page. Or you could create HTML and print the resulting HTML to a PDF document. MS Word could be also automated (Office automation) to create a document. But MS Word is an end-user application and is not being built to be automated or used server-side (licensing and stability issues).
All of these solutions are very tricky and far away from being perfect. Another solution for this common task is the usage of a PDF creation library. This way you can position elements such as text on a page. This gives you the page oriented aspect, but in most cases, you still have to take care of paging and more complex tasks such as widow and orphan control.
The easiest way to create PDF documents is the usage of TX Text Control - a word processing and reporting library to create documents programmatically. Using TX Text Control, you can create documents from scratch programmatically using the exposed API. TX Text Control is automatically taking care of page sizes, paging, margins, headers and footers and section breaks. All of these features can be completely controlled to create pixel-perfect documents in many industry-standard formats such as DOC, DOCX, RTF and Adobe PDF or PDF/A.
TX Text Control also provides a powerful mail merge engine to populate placeholder fields with data from various data sources such as JSON, XML and IEnumerable objects. Text Control reporting combines powerful word processing with high-end reporting features like master-detail repeating blocks, charts, barcodes and many more.
Essentially, an MS Word compatible template is loaded, data is merged and the resulting document can be exported to PDF. TX Text Control can be used to automate document creation processes without a UI or you can provide your end-users a fully featured, out-of-the-box MS Word inspired interface to modify documents. The editor comes with a ready-to-use ribbon interface to control all common word processing and reporting tasks without writing a single line of code.
TX Text Control is available for many platforms including Windows Forms, WPF, ASP.NET and pure JavaScript applications (based on AngularJS or other client-side JavaScrip libraries).
How to Get Started?
Download a 30-day fully featured trial version of TX Text Control for your preferred platform and start with your first template.
-
ASP.NET
TX Text Control .NET Server -
Windows Forms
TX Text Control .NET for Windows Forms
ASP.NET
Integrate document processing into your applications to create documents such as PDFs and MS Word documents, including client-side document editing, viewing, and electronic signatures.
- Angular
- Blazor
- React
- JavaScript
- ASP.NET MVC, ASP.NET Core, and WebForms
Related Posts
Extract Text and Data from PDF Documents in C#
TX Text Control can be used to create and edit Adobe PDF documents programmatically. But it is also possible to import PDF documents to read, extract and manipulate them. This article shows…
Creating PDF Files using TX Text Control .NET in C#
TX Text Control allows developers to create PDF files programmatically using C#. This article shows various ways to create Adobe PDF documents.
ASP.NETJavaScriptWindows Forms
Generating Interactive PDF Forms by Injecting JavaScript
Using TX Text Control, it is possible to export documents with form fields to fillable PDFs. This article shows how to inject JavaScript to add interaction to form fields.
Form Field Handling in PDF Documents
Since TX Text Control supports form fields, it is possible to either export form fields in the PDF document or to flatten the form fields to export text only without the field functionality. This…
Creating ZUGFeRD Compliant PDF Invoices in C#
ZUGFeRD / Factur-X documents can be created and extracted using TX Text Control X19. This article shows how to create a valid ZUGFeRD compliant invoice PDF document from scratch.