Click or drag to resize
Pdf Library for .NET

PdfToText Methods

The PdfToText type exposes the following members.

Methods
 NameDescription
Public methodCloseReleases the loaded document.
Public methodExtractText Extracts the text inside a rectangle (in PDF points, page origin top-left) on a single page (page numbers start at 1).
Public methodGetHtml Returns the document text wrapped in a minimal HTML document — the document metadata as <meta> tags in the head, and the extracted text inside a <pre> block. The result contains only text; no images are extracted.
Public methodGetInfoGets the document information (title, author, page count, etc.).
(Inherited from PdfTool)
Public methodGetPageCountGets the number of pages in the loaded PDF document.
(Inherited from PdfTool)
Public methodCode exampleGetTextReturns all the text in the document (respecting StartPageNumber / EndPageNumber).
Public methodGetText(Int32)Returns all the text on a single page (page numbers start at 1).
Public methodLoad(Byte)Loads a PDF document from a byte array.
(Inherited from PdfTool)
Public methodLoad(PdfDocument)Loads an in-memory PdfDocument for reading.
(Inherited from PdfTool)
Public methodLoad(Stream)Loads a PDF document from a stream.
(Inherited from PdfTool)
Public methodCode exampleLoad(String)Loads a PDF document from a file.
(Inherited from PdfTool)
Public methodLoad(Byte, String)Loads a password-protected PDF document from a byte array.
(Inherited from PdfTool)
Public methodLoad(PdfDocument, String)Loads an in-memory PdfDocument. The password is used to open the document.
(Inherited from PdfTool)
Public methodLoad(Stream, String)Loads a password-protected PDF document from a stream.
(Inherited from PdfTool)
Public methodLoad(String, String)Loads a password-protected PDF document from a file.
(Inherited from PdfTool)
Public methodSaveHtml(String)Writes the document text wrapped in HTML (see GetHtml) to a file (UTF-8).
Public methodSaveHtml(String, Encoding)Writes the document text wrapped in HTML (see GetHtml) to a file with the given encoding.
Public methodSaveText(String)Writes all the document's text to a file (UTF-8).
Public methodSaveText(String, Encoding)Writes all the document's text to a file with the given encoding.
Public methodCode exampleSearch(String) Searches the document for the given text (case-insensitive substring match) and returns the bounding rectangle of every occurrence.
Public methodSearch(String, Boolean, Boolean) Searches the document for the given text and returns the bounding rectangle of every occurrence.
Top
See Also