Click or drag to resize

PdfDocument Class

A PDF Document
Inheritance Hierarchy
SystemObject
  IronPdfPdfDocument

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 4.4.2.27556 (4.4.4.0)
Syntax
public class PdfDocument

The PdfDocument type exposes the following members.

Constructors
  NameDescription
Public methodPdfDocument(Byte, String)
Opens an existing PDF document for editing.
Public methodPdfDocument(Stream, String)
Opens an existing PDF document for editing.
Public methodPdfDocument(String, String)
Opens an existing PDF document for editing.
Top
Properties
  NameDescription
Public propertyBinaryData
Gets the binary data for the full PDF file as a byte array;
Public propertyPageCount
Gets the number of pages in the PDF document.
Public propertyStream
Gets the binary data for the full PDF file as a Stream
Top
Methods
  NameDescription
Public methodAppendPdf
Appends another PDF to the end of the current PdfDocument
Public methodCopyPage
Creates a new PDF by copying a page from this PdfDocument.
Public methodCopyPages(IEnumerableInt32)
Creates a new PDF by copying a range of pages from this PdfDocument.
Public methodCopyPages(Int32, Int32)
Creates a new PDF by copying a range of pages from this PdfDocument.
Public methodEquals (Inherited from Object.)
Public methodExtractAllBitmaps
Finds all embedded Images from within the PDF and returns then as System.Drawing.Bitmap objects
Public methodExtractAllImages
Finds all embedded Images from within the PDF and returns then as System.Drawing.Image objects
Public methodExtractAllText
Extracts the written text content from the PDF and returns it as a string. (PDF OCR). Pages will be separated by 4 consecutive newline characters ("\n\n\n\n")
Public methodExtractBitmapsFromPage
Finds all embedded Images from within one page of the PDF and returns them as System.Drawing.Bitmap objects
Public methodExtractBitmapsFromPages(IEnumerableInt32)
Finds all embedded Images from within a specified pages in the PDF and returns them as System.Drawing.Bitmap objects
Public methodExtractBitmapsFromPages(Int32, Int32)
Finds all embedded Images from within a range of pages in the PDF and returns them as System.Drawing.Bitmap objects
Public methodExtractImagesFromPage
Finds all embedded Images from within one page of the PDF and returns them as System.Drawing.Image objects
Public methodExtractImagesFromPages(IEnumerableInt32)
Finds all embedded Images from within a specified pages in the PDF and returns them as System.Drawing.Image objects
Public methodExtractImagesFromPages(Int32, Int32)
Finds all embedded Images from within a range of pages in the PDF and returns them as System.Drawing.Bitmap objects
Public methodExtractTextFromPage
Extracts the text content from one page of the PDF and returns it as a string. (PDF OCR)
Public methodExtractTextFromPages(IEnumerableInt32)
Extracts the written text content from specified pages in the PDF PDF and returns it as a string. (PDF OCR). Pages will be separated by 4 consecutive newline characters ("\n\n\n\n")
Public methodExtractTextFromPages(Int32, Int32)
Extracts the written text content from a range of pages within the PDF and returns it as a string. (PDF OCR). Pages will be separated by 4 consecutive newline characters ("\n\n\n\n")
Public methodStatic memberFromFile
Opens an existing PDF document for editing.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInsertPdf
Inserts another PDF into of the current PdfDocument, starting at a given Page Index.
Public methodStatic memberMerge(IEnumerablePdfDocument)
Static method that joins (concatenates) multiple PDF documents together into one compiled PDF document.
Public methodStatic memberMerge(PdfDocument, PdfDocument)
Static method that joins (concatenates) 2 PDF documents together into one final PDF document.
Public methodPrependPdf
Adds another PDF to the beginning of the current PdfDocument
Public methodRemovePage
Removes a page from the PDF at the given index.
Public methodRemovePages(IEnumerableInt32)
Removes a range of pages from the PDF
Public methodRemovePages(Int32, Int32)
Removes a range of pages from the PDF
Public methodSaveAs
Saves the PdfDocument to a file.
Public methodToString (Inherited from Object.)
Public methodTrySaveAs
Attempt to save the PdfDocument to a file.
Top
Fields
  NameDescription
Public fieldPassword
Sets a Password used to protect and encrypt the PDF File. Setting a password will cause IronPDF to automatically protect the PDF file content using strong 128 bit encryption. Setting the password to null will remove any existing password.
Top
See Also