How to convert PDF|Word|Excel to jpg in C#.NET

PDF Focus .Net -
.Net Component Converts PDF Layouts to Word, HTML5, XLS, TIFF, JPG using C# and VB

PDF Focus .NET is a component which contains an incredible wealth of features to create, read, edit and manipulate PDF documents on .NET, Silverlight and WPF Platform. As an independent PDF library, it does not need users to install Adobe Acrobat or any other third party libraries. PDF Focus.NET is completely written in C#, but also supports VB.NET, Windows Forms and ASP.NET Applications.

Download 

Using this .NET library, you can implement rich capabilities to create Word, Excel documents from scratch entirely through C#/VB.NET without installing Adobe Acrobat.

Demo version include:
- DLL component - Detailed documentation - Code samples - Sample demo program for fast converting - Test files - License agreement (License.rtf)

PDF Focus .Net is component for ASP.Net, C#, and VB.Net developers that converts PDF files to Microsoft Word Rich Text format (RTF) and popular image formats such as multipage TIFF, standard TIFF, JPG, PNG, GIF, and WMF. Unlike components that require Word or Acrobat to be installed on your computer, PDF Focus .Net was created in 100% managed C# code, and is a standalone component with no third-party dependencies.

Why PDF Focus .Net is best choice for developers?

PDF Focus .Net requires only .Net 2.0 or above, and can be used in ASP.Net, C#, VB.Net, and Delphi.Net, as well as WinForms, Silverlight, and Console. The component directly reads PDF documents of any size, and directly writes RTF, TIFF, and the other popular formats. PDF Focus .Net runs on 32-bit and 64-bit platforms on Windows, Linux, and Mac.

  • Allows to export PDF to Images (Jpeg, Tiff, Png, GIF) PDF in memory, files
  • PDF to Word documents (RTF and plain Text)
  • Fast and Intependent Libarary to convert PDF documents in different formats
  • Works in Medium Trust Level and shared hosting
  • Developed in 100% managed C# code
  • Easy to integrate in any .Net 2.0, 3.0, 3.5 and 4.0 Web and WinForms, ASP.Net, Silverlight application

The component extracts Unicode text from PDF files from custom pages. It also rasterizes PDF data to images. PDF Focus .Net maintains the accuracy of tables, images, paragraphs, bullet lists, font faces, font colors, font sizes, hyperlinks, PDF forms, edit boxes, radio buttons, stylesheets, and background colors. While keeping the original layout and format, you control the resolution and quality of images. To make it simple for software developers, PDF Focus .Net is delivered as a single .dll file.

Code Examples of using PDF Focus .Net
PDF to Word, RTF
1. Convert PDF file to Word file in C#:
          SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();	    	
          f.OpenPdf(@"d:\History.pdf");
          if (f.PageCount > 0)
          {
           int result = f.ToWord(@"d:\History.rtf");
         //Open Word document
           if (result==0)
          {
           System.Diagnostics.Process.Start(@"d:\History.rtf");
           }
          }
      
2. Convert PDF to RTF in memory using C#:
          byte[] pdf = File.ReadAllBytes(@"c:\Book.pdf");
          SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
          f.OpenPdf(pdf);
          if (f.PageCount > 0)
          {
           f.WordOptions.Format = SautinSoft.PdfFocus.CWordOptions.eWordDocument.Rtf;
           string word = f.ToWord();
            //now the variable 'word' contains RTF document
          }
      
3. Convert 2nd-3rd pages of PDF document Word in VB.Net:
          Dim f As New SautinSoft.PdfFocus()
          f.OpenPdf("http://somesite.com/forprint.pdf")
          If f.PageCount > 2 Then
         'Convert only pages 2 - 3 to Word
          Dim result As Integer = f.ToWord("f:\foredit.doc", 2, 3)
          'Show Word document
          If result = 0 Then
          System.Diagnostics.Process.Start("f:\foredit.doc")
          End If
          End If

      
4. Export PDF to Word in ASP.Net-C#:
          SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
          f.OpenPdf(FileUpload1.FileBytes);
          if (f.PageCount > 0)
         {
         //Let's whole PDF document to Word (RTF)
          rtf = f.ToWord();
          }
          //show Word/rtf
          if (rtf != "")
         {
         Response.Buffer = true;
         Response.Clear();
         Response.ContentType = "application/msword";
         Response.AddHeader("Content-Disposition:", "attachment; filename=Result.doc");
         Response.Write(rtf);
         Response.Flush();
         Response.End();
         }
        
5. Convert PDF file to Word file in VB.Net:
       Dim f As New SautinSoft.PdfFocus()
       f.OpenPdf("c:\Simple Text.pdf")
       If f.PageCount > 0 Then
       Dim result As Integer = f.ToWord("c:\Result.doc")
       'Show Word document
       If result = 0 Then
       System.Diagnostics.Process.Start("c:\Result.doc")
       End If
       End If

PDF to Image, Jpg, Tiff
1. Convert PDF file to JPEG using C#:
       SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
      f.OpenPdf(@"c:\Document.pdf");
      if (f.PageCount > 0)
      {
     //Save all PDF pages to jpeg images and put them in ArrayList, set 120 dpi
      f.ImageOptions.Dpi = 120;
      f.ImageOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
      ArrayList images = f.ToImage();
    //Next manipulate with Jpeg in memory or save to HDD, open in a viewer
      }
 
2. Convert PDF file to Multipage TIFF file with 300 dpi in C#:
      autinSoft.PdfFocus f = new SautinSoft.PdfFocus();
      f.OpenPdf(@"c:\Document.pdf");
      if (f.PageCount > 0)
      {
      //Save to multipage TIFF file with 300 dpi
       f.ImageOptions.Dpi = 300;
       f.ToMultipageTiff(@"c:\Result.tiff");
        }
3. PDF document to System.Drawing.Image object in C#:
       SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
       f.OpenPdf(@"c:\Document.pdf");
       if (f.PageCount > 0)
       {
       //Save 1st page to System.Drawing.Image with 120 dpi
       f.ImageOptions.Dpi = 120;
       System.Drawing.Image img = f.ToDrawingImage(1);
       }
4. Convert PDF document to PNG in ASP.Net-VB.Net:
        Dim f As New SautinSoft.PdfFocus()
        f.OpenPdf(FileUpload1.FileBytes)
       If f.PageCount > 1 Then
       'Let's convert 2nd page from PDF document
       f.ImageOptions.Dpi = 120;
       f.ImageOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Png
       Dim image() As Byte = f.ToImage(2)
      'show image
       Response.Buffer = True
       Response.Clear()
       Response.ContentType = "image/jpeg"
       Response.AddHeader("Content-Disposition:", "attachment; filename=Page2.png")
       Response.BinaryWrite(image)
       Response.Flush()
       Response.End()
       End If
5. Convert PDF document to Bitmap in C#:
       SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
       f.OpenPdf(@"c:\Document.pdf");
       if (f.PageCount > 4)
       {
       //Save 1st page to Bitmap 200 dpi
       f.ImageOptions.Dpi = 200;
       System.Drawing.Bitmap bmp1 = (System.Drawing.Bitmap)f.ToDrawingImage(1);
       System.Drawing.Bitmap bmp5 = (System.Drawing.Bitmap)f.ToDrawingImage(5);
       }
            
Extract Text from PDF
1. Extract Text from custom pages of PDF file using C#:
       SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
       f.OpenPdf(@"d:\Cook Book.pdf");
       if (f.PageCount > 2)
       {
        //Convert only pages from 2 to 3 in Text
        f.ToText(@"d:\Cook Book.txt", 2, 3);
       }
2. Convert whole PDF document to Text in memory using C#:
       SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
       //Read PDF to byte array
       byte[] pdf = File.ReadAllBytes(@"d:\Sample.pdf");
       f.OpenPdf(pdf);
       if (f.PageCount > 0)
       {
       string text = f.ToText();
      //Save to text file
       File.WriteAllText(@"d:\Sample.txt", text);
       }
3. Extract Text from all pages of PDF in ASP.Net/VB.Net:
       Dim f As New SautinSoft.PdfFocus()
       Dim url As New Uri("http://www.website.com/sample.pdf")
       f.OpenPdf(url)
       If f.PageCount > 0 Then
       'Convert whole PDF to Text (extract text from PDF)
       Dim text As String = f.ToText()
       'show text
       TextBox1.Text = Text
       Else
       TextBox1.Text = "Converting failed!"
       End If
4. Convert 1st page of PDF to Text in VB.Net:
       Dim f As New SautinSoft.PdfFocus()
       Dim pdf() As Byte = File.ReadAllBytes("d:\Simple.pdf")
       Dim text As String = ""
       f.OpenPdf(pdf)
       If f.PageCount > 0 Then
       text = f.ToText(1, 1)
       'show text
       If text <> "" Then
       TextBox1.Text = text
       End If
       End If

Purchase FAQs


  1. Licensing questions
    1. Does the license provide royalty free use of components?
    2. What's the difference between developer and server licenses?
    3. What's the difference between “1 Developer and 1 Server” and “1 Developer and Unlimited Servers” licenses?
    4. How I can use "Source Code License"?
    5. We'd like to redistribute your component as part of a Windows Forms application, what sort of license would be required?
    6. My company is looking at purchasing your component, that will be installed on one of our productions servers. We will also need a license for the developer in order to make additional changes to our application. I need to verify which license type we will need?
    7. We have an ASP.NET application and we are planning to use it for our system, we are software company that sell applications for different clients, do we have to buy your component just once or we have to purchase a different license for each of our clients?
    8. For what purposes I can use "1 Server License"?
    9. Is it possible to upgrade one license to another?
  2. Payment options and order process
    1. How do you accept orders and how does look the order process?
    2. Which payment options are supported?
    3. How to purchase through Purchase Order?
  3. Getting updates
    1. How long I can use your software? Does it have annual subscription?
    2. Does the product have free updates?
    3. How to get update?
  4. Discounts and resellers
    1. What discounts are available for resellers?
    2. What discounts are available for educational and non-profit organizations?
    3. How to get 10% discount?
    4. I've found an issue in your component may I get a discount on purchasing?
    5. May I sell your products with getting revenue for me?
  5. Delivery
    1. How do you deliver your products?
    2. How long it will take to get product after purchasing?

Licensing questions

a. Does the license provide royalty free use of components?

Yes, all licenses have royalty free basis of using our components.

b. What's the difference between developer and server licenses?

First of all, the "Developer" is a basis license. You can't use "Server" license if you don't have a "Developer" license. The "Server License" is necessary only for deploying the Web-applications, for example ASP.Net.

If you are developing Windows Forms, Console or Desktop applications take a look only at the first part of license name "1 Developer ...", "4 Developers ...", "Site License ..."or "Source Code License ...". Don't care about number of "N Server Licenses", they are for ASP.Net apps. For example, if you are standalone developer the best way for you is "1 Developer ... License". If you are company and you have several developers who will work with the component choose between "4 Developers ..." and "Site License ...".

Regarding "Server License", it allows to deploy Internet applications with our component. For example, if you want to deploy your applications with our component on two production servers - the best choice is purchasing "1 Developer and 2 Servers License".

c. What's the difference between “1 Developer and 1 Server” and “1 Developer and Unlimited Servers” licenses?

Both licenses allows a single developer to develop unlimited number of WinForms and Web applications. But "1 Developer and 1 Server License" allows to deploy the component only at on production server. Another license doesn't have any limits of production servers.

d. How I can use "Source Code License"?

The Source Code is not for distribution, you can use only for development: including into your applications instead of dll file, bug fixing, own improvement of the component. You can't use it to create competitor product.

e. We'd like to redistribute your component as part of a Windows Forms application, what sort of license would be required?

So, if you plan redistribute our component with WinForms applications take a look only at the first part of license name "1 Developer ...", "4 Developers ...", "Site License ..."or "Source Code License ...".
Don't mind at number of "N Server Licenses", they are for ASP.Net apps.

All of our developer licenses are valid to redistribute the component with unlimited number of WinForms applications.

For example, if you are standalone developer the best way is "1 Developer ... License", if you are company and you have several developers who will work with dll choose between "4 Developers ..." and "Site License ...".

f. My company is looking at purchasing your component, that will be installed on one of our productions servers. We will also need a license for the developer in order to make additional changes to our application. I need to verify which license type we will need?

In my view the "1 Developer and 1 Server License" is enough for your needs. It covers a one developer and one server. We don't count testing servers.

g. We have an ASP.NET application and we are planning to use it for our system, we are software company that sell applications for different clients, do we have to buy your component just once or we have to purchase a different license for each of our clients?

If only one developer in your company will work with the component: you may purchase "1 Developer and 1 Server License". For each new client you will need extra "1 Server License" because it's ASP.Net application. But you may purchase "1 Developer and Unlimited Servers License" to cover unlimited number of production servers and clients.

h. For what purposes I can use "1 Server License"?

This license is necessary to deploy the component with your apps on additional production server.

i. Is it possible to upgrade one license to another?

Yes, sure it's possible. For example, you have "1 Developer and 1 Server License" and want to upgrade it to "1 Developer and Unlimited Servers License". Your steps:

  1. Email us at sales@sautinsoft.com with mention about upgrading
  2. We'll send you a link to pay difference between licenses cost

Payment options and order process

a. How do you accept orders and how does look the order process?

For your convenience, we teamed up with Avangate to provide a secure and reliable platform for selling our software products online. The whole ordering process is supported by Avangate, who handles all transactions details. Your private data is 100% safe, as Avangate complies with the latest online security standards.

Payment options by Avangate

Whole ordering process works automatically. These are steps to purchase product:

  1. Select desired license and click by the 'order' link from table with licenses and prices. Next you will be redirected to our 'https' page on Avangate.
  2. On this page you will fill your data and select desired payment type from Credit card, PayPal, Wire Transfer, American Express, Purchase Order and a lot of other payment types.
  3. After processing of your order Avangate will automatically send to you email with link to download full version of product and your registration data (serial number, order ID, license type, name).

    Whole ordering process and getting licensed software takes few minutes!
b. Which payment options are supported?

These payment options are supported now:

Payment options by Avangate

  • Visa/MasterCard/Eurocard
  • American Express
  • Discover/Novus
  • Bank/Wire transfer
  • Diners Club
  • JCB
  • PayPal
  • Fax
  • Purchase order

To see a whole list with payment options click by the 'order' link from table with licenses and prices. Take a look at the field 'Payment options'.

c. How to purchase through Purchase Order?

Purchasing by Purchase order is allowed for companies and organizations. Private persons can't use this payment option.

To place an order through Purchase Order:

  1. Select desired license and click by the 'order' link from table with licenses and prices. Next you will be redirected to our 'https' page on Avangate.
  2. On this page you will fill your data and select payment option 'Purchase Order'.

Getting updates

a. How long I can use your software? Does it have annual subscription?

You may use it as long as you want, it doesn't have any limits or annual subscriptions.

b. Does the product have free updates?

Yes, all minor updates are free. For example, you've purchased the version
1.1 therefore you may get these versions for free: 1.2, 1.3, 1.4, ...
1.9. (all 1.x).

Getting of major update cost 40% of price of minimal license. In other words: 40% of "1 Developer License" price. Even if you have the "Site License" so the major update will cost for you only 40% of "1 Developer License" price.

For example, if you have version 1.x and want to get version 2.x or 3.x - it names major update.

We are making major updates not early than one time per year, other times we are making minor updates which are free.

c. How to get update?

To get update email us at support@sautinsoft.com with mention of your Order ID. We are developing 'https' clients area now, so very soon clients will be able to get update easily using client's cabinet.

Discounts and resellers

a. What discounts are available for resellers?

We offer 20-25% discount for resellers, we are always opened to discuss it: sales@sautinsoft.com.

b. What discounts are available for educational and non-profit organizations?

For educational and non-profit organizations we can offer up to 50% discount, it depends of license type.

c. How to get 10% discount?

If you want to get 10% discount, simply email us at sales@sautinsoft.com with mention that you want to get 10% discount and desired license type.

d. I've found an issue in your component may I get a discount on purchasing?

If you've found a bug, we can offer you 10% discount on purchasing. Bug will be fixed into next update and delivered to you after release.

e. May I sell your products with getting revenue for me?

Yes, sure you may register in our affiliate program and sell our software:

  • You will get 25% commision from each sale
  • You will be able make discount up to 20% from your commision to sell with discounted price

Start selling our software and get paid for it!

Delivery

a. How do you deliver your products?

We deliver our products electronically via email. Delivery process works automatically. If you have any questions email us at sales department: sales@sautinsoft.com.

After purchasing you will get a registration email with link to download software and your registration data.

Note: we deliver the source code license manually, so depending of time zone it make take 1 bussiness day.

b. How long it will take to get product after purchasing?

After processing your order we will send to you registration email with link to download software and registration data immediately.

For example if you paid by credit card, whole process from order processing to getting software takes a few minutes.

Note: we deliver the source code license manually, so depending of time zone it make take 1 bussiness day.

 

Getting Started
  1. Launch Microsoft's Visual Studio .NET
  2. Create a new project or open existing
  3. In Solution Explorer right click "References" and "Add Reference":
  4. convert images html to pdf

  5. Add reference to PDFFocus.dll
    (for .Net 1.1 it located in: "Net 1.1\PdfFocus.dll")
    (for .Net 2.0, 3.0, 3.5 and 4.0 it located in: "Net 2.0, 3.0 and 3.5\PdfFocus.dll")
  6. Well done! Now your project able to convert PDF to Microsoft Word!
Version History

January 17th, 2014

We are glad to announce about releasing new PDF Focus .Net 4.0 What's new:

  • Starting from the version 4.0 PDF Focus .Net can convert PDF to HTML web-pages and Excel workbooks. These features work absolutely standalone without any dependencies of a Browser or MS Excel, the same as all other features of the PDF Focus .Net.
  • Improved the algorithm of font size selection to make a resulted Word document close to original PDF

  • The new version is 100% compatible with Windows 8


  • Improved the converting of documents with text columns

2.7.10.3 - October 3rd, 2012

We are glad to announce about releasing new PDF Focus .Net 2.7.10 What's new:

  • Improved the converting of PDF documents into plain Text documents (extract text from PDF)
  • Added the new property 'Password' to process PDF documents protected by password

  • transformation pdf to word


  • Improved the qualitity of processing PDF documents with colored images

April 12th, 2012 new version 2.4.4.12

We are happy to announce about releasing new PDF Focus .Net 2.4.4.12
What we've added:

  • Added support of converting PDF documents to Word which have a big page size. The matter in that the Microsoft Word supports maximum page size in 22x20 Inches. If a PDF page has a size more than 22 Inches, all page content will be scaled to 22 Inches proportionally.

  • New Free & Online service to estimate the PDF Focus .Net

  • Improved the engine to render graphics in the PDF to Images direction
  • Fixed the issue with superscript text
  • Fixed the issue with background filling

02-Feb-2012 new version 2.2.2

Convert:

- PDF to Word, RTF
- PDF to Image, Jpg, Tiff, Gif, PNG
- Extract Text from PDF

Now converting PDF to Word documents or common graphics files is easy!

  • Added support for CCITT images
  • Added support for CFF fonts
  • Improved image converting
  • Improved text formatting
  • Fixed different minor issues, component became more stable than previous version.
  • August 20th, 2008

    Released version 1.0.3, new:

  • Converting password protected PDF, new property 'Password'
  • Improved text formatting
  • Support non-standard fonts.
  • May 20th, 2008

    Released version 1.0.1, added new useful features:

  • Added support of header, footers and page sections
  • Corrected PDF to Word (rtf)converting direction
  • Text formating and alignment improved
  • Added new default fonts: italic, bold, italic-bold
  • Improved algorithm of cell merging
  • Cell padding support
  • Transfer lengthy cells to new page
  • Backgroud and shading for tables
  • May 15th, 2008

    We offer you absolutely new product - PDF Focus .Net! It's a C# component to convert PDF into Word (rtf) with only two lines of code from your application. Our component is absolutely standalone and independent, it doesn't require Adobe Acrobat®.

  • Released version 1.0.0

Our customers
Sautin Software has partnered with Avangate!-(www.avangate.com) to provide secure online purchasing and download service for our products. Consumers can be sure that their personal and financial information stays private and protected. All transactions are made in a secure environment.
Avangate founded in 2006, is located in Amsterdam, The Netherlands.
    Avangate has a global reach by being present in key regions:
  • North America - Corporate: Redwood Shores, CA
  • Western Europe - HQ: Amsterdam, The Netherlands
  • Eastern Europe - Development, Marketing & Support: Bucharest, RO
  • APAC - Sales Support
Methods of Payment:

avangate payment

100% Unconditional Money-Back Guarantee!
SautinSoft products embody the highest quality and performance standards to ensure complete customer satisfaction. We are so confident in our products that we will provide a total refund within the first 60 days of purchase if you find that our product does not meet your expectations in any way.
our customer

our customer

our customer

our customer

our customer

our customer.
our customer

our customer

our customer

our customer

 

Below you may choose a specific configuration of PDF Focus Net:
All in one toolkit "PDF Focus .NET Total edition" - All in one toolkit
converts PDF to MS Word, Text, Excel "PDF Focus .NET Office edition" - converts PDF to MS Word, Text, Excel
converts PDF to Images "PDF Focus .NET Picasso edition" - converts PDF to Images
converts PDF to HTML "PDF Focus .NET HTML edition" - converts PDF to HTML

PDF Focus .Net - Total edition
PDF to Word, Text, Images, Excel, Html
Price  
1 Developer License $578(US)
1 Developer and 1 Server License $777(US)
1 Developer and Unlimited Servers License $1578(US)
Additional Server License (*Requires Developer License) $199(US)
Site and Unlimited Servers License $3400(US)

 

PDF Focus .Net - Office edition
PDF to Word, Text, Excel
Price  
1 Developer License $399(US)
1 Developer and 1 Server License $498(US)
1 Developer and Unlimited Servers License $1049(US)
Additional Server License (*Requires Developer License) $99(US)
Site and Unlimited Servers License $2000(US)

 

PDF Focus .Net - Picasso edition
PDF to Jpeg, Bmp, Png, Gif, Tiff, multipage Tiff
Price  
1 Developer License $199(US)
1 Developer and 1 Server License $298(US)
1 Developer and Unlimited Servers License $849(US)
Additional Server License (*Requires Developer License) $99(US)
Site and Unlimited Servers License $1200(US)

 

PDF Focus .Net - HTML edition
PDF to HTML
Price  
Site and Unlimited Servers License $299(US)
1 Developer and 1 Server License $398(US)
1 Developer and Unlimited Servers License $949(US)
Additional Server License (*Requires Developer License) $99(US)
Site and Unlimited Servers License $1600(US)

Price includes getting of standard technical support via email, phone, free updates for a full version cycle.