How to make a PDF document from a text file

2017-08-25

Today we will talk about the cases when you need to make a PDF document, but there is no Adobe Acrobat on the computer. You only have a text file with original data and FastReport Desktop.

To begin with, you need a test file, in which there is a division into paragraphs (carriage return to a new line). Such a data source will allow you to use paragraphs as data strings.

Now let's create a report in the designer.

Create a new data source:

 

Note the Separator field. By the way, you can enter any character that does not exist in the document, and this will allow you to use carriage return at the end of each paragraph as a separator.

Then select the column Field0:

In the data window appeared a source with one field:

 

Drag this field to the "Data" band and stretch it to the full width:

To fit the entire paragraph text on the band, enable the CanGrow property (can grow) for the added field and for the Data band. You can do this from the context menu:

Also, we call the context menu for the band by right clicking on the band header.

Add a title:

Let's see how the report looks in the preview mode:

As you can see, from a regular text file we received a paragraph-broken document.

So, half the work is done. It remains only to configure the export of the report to PDF format using FR Desktop.

Launch the Configurator tool. Choose the report we created:

We mark the option Export as. And choose the PDF format:

The next step is to select the folder where our PDF document will be saved. To do this, select the Save to option and select the value of Folder:

To select a folder, click the Settings button.

Now, save the configuration with the Save button. You can run the configuration file for execution immediately using the Run button, or use it later with the scheduler.

Press the Run button:

We will check the folder specified in the config. And there is! File created:

As we have seen, you can easily create PDF documents from text files using FastReport.

.NET FastReport Desktop CSV PDF
10 de julho de 2026

Como configurar a Política de Segurança de Conteúdo para os relatórios FastReport .NET WEB

Aprenda como configurar a Política de Segurança de Conteúdo para relatórios do FastReport .NET WEB: uma visão geral das diretivas e valores da CSP, mudanças na arquitetura do FastReport, cenários típicos de contorno e formas de se proteger contra eles.
22 de junho de 2026

Como configurar um relatório com Business Objects no código e no designer do FastReport .NET

Este artigo demonstra um exemplo prático de criação e uso de um modelo de relatório .frx que se conecta a Business Objects hierárquicos no FastReport .NET.
20 de maio de 2026

Visão geral detalhada das capacidades da biblioteca FastGrid

Uma visão geral da biblioteca FastGrid para VCL e Lazarus: visualização, edição e estruturação de dados. Classificação, filtragem, agrupamento, editores de dados práticos — tudo em um único artigo!

© 1998-2026 Fast Reports Inc.