How to convert PDF document to RTF or Text document
на C# и .NET

Up to date, every tenth document published in Internet is presented in PDF format. PDF format is widely used for preparing different electronic documents which can contain fonts, graphics and multimedia elements.

Who uses PDF documents and needs their editing?

Students who need information for writing coursework or diploma work. As a matter of fact, most of electronic educational Internet resources, containing necessary information for learning activities, are presented by PDF files.

Lawyers who compile different agreements and contracts in PDF format; it happens that the text of a document doesn’t exist in another format but it is necessary to urgently make some changes or alterations in it.

Magazine editors, who receive articles in PDF-format and have correspondence with their clients, very often need to edit the articles.

SautinSoft Company presents a new SautinSoft.PdfFocus component which can help any developer to create applications (WinForms, Web-Apps, Silverlight) with the function of quick and above all exact conversion of practically any PDF document into editable formats RTF or Text, while preserving its design and contents.

The component has the following performance capabilities:

  • Converting PDF into Word;
  • Converting PDF into Text;
  • Rasterizing PDF into images;
  • Exportation of PDF into Multipage-TIFF;

Besides, during the converting PDF document, there is a possibility to adjust the following: image quality (dpi); choosing the format suitable for you – JPG, PNG, BMP, TIFF (Image format), and also color depth (RGB, GRAYSCALE).

Let’s look how to use the “SautinSoft.PdfFocus.dll” in Visual Studio .Net:

  1. Launch Microsoft’s Visual Studio .NET
  2. Create a new project or open existing.
  3. In Solution Explorer right click “References” and then click “Add Reference”.
  4. Add a reference to the SautinSoft.PdfFocus.dll.
  5. Well done! Now your project able to convert PDF documents to Word, Images and other formats!

These are code samples in C#:

             // Convert PDF to Word in C#:
    SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
    f.OpenPdf(@"c:\Robinson Crusoe.pdf");

    if (f.PageCount > 0)
       f.ToWord(@"c:\Robinson Crusoe.rtf");

    //Convert PDF file to Images in C#:
    SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
    f.OpenPdf(@"c:\Robinson Crusoe.pdf");

    //Set image properties
    f.ImageOptions.Dpi = 120;
    f.ImageOptions.ImageFormat = Drawing.Imaging.ImageFormat.Png;
    for (int page=1; page&=> =f.PageCount; page++)
       f.ToImage(@"c:\Page" + page + ".png", page);

If you are looking for simple and convenient solution for converting PDF documents to RTF, then the component is created just for you!

Read more how to convert PDF documents to Word in .NET

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

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

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