Click or drag to resize

PdfFocus Class

PDF Focus .Net is designed to convert PDF documents to All formats.
Inheritance Hierarchy
SystemObject
  SautinSoftPdfFocus

Namespace: SautinSoft
Assembly: SautinSoft.PdfFocus (in SautinSoft.PdfFocus.dll) Version: 2024.3.28
Syntax
public class PdfFocus

The PdfFocus type exposes the following members.

Constructors
 NameDescription
Public methodCode examplePdfFocus Creates an object of the PdfFocus class
Top
Properties
 NameDescription
Public propertyCode exampleCopyrightText Gets and sets the text which will be placed on the each page at the top-left corner of the resulting document. For example, "Created by ....". Default value: String.Empty.
Public propertyCode exampleEmbeddedImagesFormat Gets and sets the desired format to store images in the resulting document. Default value: eImageFormat.Auto.
Public propertyEmbeddedJpegQuality Gets and sets the value indicating Jpeg quality level for the images embedded in the output documents. Affects only to the images which embedded in Jpeg format. Default value: 90.
Public propertyExcelOptions Set properties for the Excel document
Public propertyException Get an exception details in case of conversion failed.
Public propertyCode exampleHtmlOptions Gets and sets various properties for HTML document: title, how to store images, inline CSS and so forth.
Public propertyCode exampleImageExtractionOptions Allows to set properties to extract only specific images from PDF.
Public propertyImageOptions Set the options for the produced images.
Public propertyCode exampleOCROptions Set the properties to attach any OCR library.
Public propertyOptimizeImages Gets or sets a value indicating whether to merge adjacent images into a one. Default value: false.
Public propertyCode examplePageCount Get the number of pages in the PDF document.
Public propertyCode examplePassword Set a password for password-protected PDF documents.
Public propertyCode examplePreserveEmbeddedFonts Gets or sets a mode indicating whether to load embedded fonts from PDF and store them in document or skip them and use similar. Default value: Auto.
Public propertyCode examplePreserveGraphics Gets or sets a value indicating whether to load vector graphics from PDF or skip it. Default value: true.
Public propertyPreserveImages Gets or sets a value indicating whether to load images from PDF or skip them. Default value: true.
Public propertyCode exampleRenderPages Allows to specify a set of page ranges for converting
Public propertyCode exampleRenderPagesString Sets a custom page range for converting: "1-3, 5, 8-13, 16".
Public propertyStatic memberCode exampleSerialObsolete.
This property is obsolete, please use the method SetLicense(String).
Public propertyCode exampleVersion Get the current version of the component.
Public propertyCode exampleWordOptions Allows to specify various properties for Word document: format (Docx or Rtf), how to detect tables and so forth.
Public propertyXmlOptions Set properties for the XML document
Top
Methods
 NameDescription
Public methodClosePdf Releases the PDF document from memory.
Public methodCode exampleExtractImages Extract all images from a whole PDF document.
Public methodCode exampleExtractImages(Int32, Int32) Extract all images from PDF document from specific pages.
Public methodGetPageSize Returns the page height and width in points for a specific page
Public methodCode exampleOpenPdf(Byte) Opens PDF document as byte stream.
Public methodOpenPdf(Stream) Opens PDF document as Stream object.
Public methodOpenPdf(String) Open a PDF file.
Public methodCode exampleOpenPdf(Uri) Open PDF document as Uri.
Public methodStatic memberCode exampleSetLicense
Activate your copy after purchasing or use temporary license for delete trial message. ATTENTION: specify this property first of all before creating the instance of SautinSoft.PdfFocus.

Use it when you got own license. We offer two license types:

Permanent license from sautinsoft.com and

Temporary license from sautinsoft.com/start-for-free/.

Have question? Ask us: support@sautinsoft.com.
Public methodCode exampleToDrawingImage Saves the specific page of the PDF document into Image.
Public methodCode exampleToExcel Saves all pages of the PDF document into Excel workbook and returns it as byte array
Public methodCode exampleToExcel(String) Saves all pages of the PDF document to Excel file
Public methodToExcel(Int32, Int32) Saves a specific PDF page or diapason of pages to Excel workbook and returns it as byte array
Public methodToExcel(String, Int32, Int32) Saves a specific PDF page or diapason of pages to Excel file
Public methodCode exampleToGifImage Saves the specific pages of the PDF document as Gif image file.
Public methodCode exampleToHtml Saves all pages of the PDF document into HTML document as string object.
Public methodToHtml(Stream) Saves all pages of the PDF document into HTML (Fixed or Flowing) format as a Stream object.
Public methodCode exampleToHtml(String) Saves all pages of the PDF document to HTML file
Public methodCode exampleToHtml(Int32, Int32) Saves a specific PDF page or diapason of pages to HTML document as string object.
Public methodCode exampleToHtml(Int32, Int32, ListSKBitmap) Saves a specific PDF page or diapason of pages to HTML document and returns it as string
Public methodToHtml(Stream, Int32, Int32) Saves a specific PDF page or diapason of pages into a HTML (Fixed or Flowing) format as a Stream object.
Public methodCode exampleToHtml(String, Int32, Int32) Saves a specific PDF page or diapason of pages to HTML file
Public methodToImage Saves all pages of the PDF document into ArrayList with images as byte streams.
Public methodCode exampleToImage(Int32) Saves the specific page of the PDF document as image.
Public methodCode exampleToImage(String, Int32) Saves the specific page of the PDF document as image file.
Public methodCode exampleToImage(String, String) Saves all pages of PDF document as image files.
Public methodToImage(String, String, String) Saves all pages of PDF document as image files and returns their full paths.
Public methodToMultipageTiff Saves all pages of the PDF document to multipage-TIFF document as array of bytes.
Public methodToMultipageTiff(Stream) Saves all pages of the PDF document to multipage-TIFF document as a Stream object.
Public methodCode exampleToMultipageTiff(String) Save the PDF document as multipage-TIFF document.
Public methodToMultipageTiff(Stream, Int32, Int32) Saves a specific PDF page or diapason of pages to multipage-TIFF document as a Stream object.
Public methodCode exampleToText Saves all pages of the PDF document as Text document and return it as String.
Public methodCode exampleToText(String) Saves all pages of the PDF document as Text file.
Public methodCode exampleToText(Int32, Int32) Save the specific PDF page or the range of pages as Text document and return it as String.
Public methodCode exampleToText(String, Int32, Int32) Save the specific PDF page or range of pages in Text file.
Public methodCode exampleToWord Saves all pages of the PDF document into a Word (Docx or RTF) document and returns it as array of bytes
Public methodCode exampleToWord(Stream) Saves all pages of the PDF document to Word (Docx or RTF) as a Stream object.
Public methodCode exampleToWord(String) Saves all pages of the PDF document in Word file.
Public methodCode exampleToWord(Int32, Int32) Saves a specific PDF page or diapason of pages to a Word (Docx or RTF) document and returns it as array of bytes.
Public methodCode exampleToWord(Stream, Int32, Int32) Saves a specific PDF page or diapason of pages to a Word (Docx or RTF) document as a Stream object.
Public methodCode exampleToWord(String, Int32, Int32) Saves the specific PDF page or range of pages in Word file.
Public methodCode exampleToXml Saves all pages of the PDF document into XML document and returns it as string
Public methodToXml(Stream) Save all pages of the PDF document to XML document into specified Stream.
Public methodCode exampleToXml(String) Saves all pages of the PDF document to XML file
Public methodToXml(Int32, Int32) Saves a specific PDF page or diapason of pages to XML document and returns it as string
Public methodToXml(Stream, Int32, Int32) Save specific pages of the PDF document to XML document into specified Stream.
Public methodToXml(String, Int32, Int32) Saves a specific PDF page or diapason of pages to XML file
Top
Events
 NameDescription
Public eventNotifyPageProgress Allows to define a progress indicator
Top
Remarks

PDF Focus .Net is designed to help you in development of applications where is necessary to convert any PDF documents. Let's see what the component can do for you:


  • Convert PDF to Word, DOCX, RTF with tables, images, full text formatting
  • Convert PDF to Text
  • Convert PDF to HTML with full text formatting, images, CSS
  • Convert PDF to Excel workbooks
  • Convert PDF to Images: Jpeg, Png, Bmp, Tiff, Multipage-Tiff, System.Drawing.Image.
  • Convert PDF to XML workbooks
  • Extract images from PDF
  • Get the number of pages in PDF and their sizes
  • Convert only a specific page or diapason of pages from a PDF document
  • Manipulate with PDF documents as files, streams, urls
  • Works in Medium Trust level and shared hosting
  • Requirements: from .NET Framework 4.0 to .NET 6.0 and higher.
See Also