Delphi.NET – How to convert PDF to WORD

Hi Everyone!

Firstly, you need to download the latest distribution of SautinSoft’s SautinSoft.PdfFocus: Скачать

More information about the component:SautinSoft.PdfFocus

Secondly, you must have installed the development environment Delphi. In this example, I’m using Delphi .Net 2009 for Microsoft .NET.

I will build a simple windows application with one button. Clicking by this button will launch the PDF to Word conversion.

Let’s get started...

Run the development Delphi environment. Create a new project.

You will see this form:

Next add a reference to the PDF Focus.Net library. In the package (, which you have downloaded from here, browse the folder “/ Bin/Net 2.0” and choose the file SautinSoft.PdfFocus.dll.

Click on the Reference right mouse button. Then, on the .Net Assemblies, click Browse and navigate to the directory with the SautinSoft.PdfFocus.dll.

Then click OK. You will see that the Reference to SautinSoft.PdfFocus library has been added.

Now add a standard button from the Tool Palette. Let’s name the button – «Convert».

Ok, the most difficult part of the project is done. J It remains to add a few lines of code and we get a comprehensive PDF converter.

Double-click on the Convert button and get into the source code of our project.

In the directory Uses you need to add some libraries (ShellApi, SautinSoft):

In the directory Var declare additional variable (f):

Finally, it is necessary to prescribe the actions that will take place after we press the Convert button:

I will do some explaining.

The library SautinSoft.PdfFocus has many options for converting PDF to WORD, PDF to IMAGES, PDF to HTML, PDF to EXCEL. We’ve used only the one direction: PDF to WORD. However, no one is stopping you to experiment with a variety of additional parameters, which are very well described in the documentation:

f.OpenPdf(…) – specify the path to the PDF file which you want to convert.

f.ToWord(…) – specify the path to a Word file, which will appear as a result of the conversion.

If the conversion is successful, then the Doc file will open automatically in a standard text editor (such as MS Word).

So… to compile the project and launch our project:

After clicking the button, the PDF file – simple_text.pdf, converted to the Doc file – result.doc

You can save the entire project to the disk and experiment with other PDF files.

If you have any questions about the transformation of PDF document to Doc, Images or any formats, please email: [email protected]

Our other components to convert different document formats can be found here:

Если вам нужен пример кода или у вас есть вопрос: напишите нам по адресу [email protected] или спросите в онлайн-чате (правый нижний угол этой страницы) или используйте форму ниже:

Вопросы и предложения всегда приветствуются!

Мы разрабатываем компоненты .Net с 2002 года. Мы знаем форматы PDF, DOCX, RTF, HTML, XLSX и Images. Если вам нужна помощь в создании, изменении или преобразовании документов в различных форматах, мы можем вам помочь. Мы напишем для вас любой пример кода абсолютно бесплатно.