Document Solutions for PDF
DS.Documents.Pdf Assembly / GrapeCity.Documents.Pdf Namespace / GcPdfDocument Class

In This Topic
    GcPdfDocument Class Methods
    In This Topic

    For a list of all members of this type, see GcPdfDocument members.

    Public Methods
     NameDescription
    Public MethodClears the document, removing all content and resetting all properties and settings to their initial default values.  
    Public MethodDeletes a specified text from all pages of the current document.

    Note that the results may be affected by the current value of the RecognitionAlgorithm property.

     
    Public MethodEnds document generation in sequential mode. This call must be preceded by a call to StartDoc.  
    Public MethodOverloaded. Exports the document's form data to a stream in FDF format.  
    Public MethodOverloaded. Exports the document's form data to a stream in XFDF format.  
    Public MethodOverloaded. Exports the document's form data to a stream in XML format.  
    Public MethodSearches for all occurrences of a text in a range of the document's pages.

    Note that the results are affected by the value of RecognitionAlgorithm property.

     
    Public MethodGets the list of fonts in this GcPdfDocument.  
    Public MethodOverloaded. Gets the list of images in this GcPdfDocument.

    Note that for large documents this method can take a while to complete, as it enumerates the content streams of all pages in the document.

     
    Public MethodOverloaded. Parses the PDF's structure tree (as returned by the StructTreeRoot property) and creates a GrapeCity.Documents.Pdf.Recognition.Structure.LogicalStructure object that represents the logical structure of the document.

    Returns null if the current document does not have a structure tree.

     
    Public MethodOverloaded. Extracts and returns all text from the current document.  
    Public MethodOverloaded. Imports the document's form data from a key/value collection.

    The keys are field names, the values are collections of field values.

    For nested fields, the field's name should include all its parents' names delimited by dots, e.g. TopParent.Parent.MyField.

    This method may be especially useful when importing form data submitted by a web page.

     
    Public MethodOverloaded. Imports the document's form data from a stream in FDF format.  
    Public MethodOverloaded. Imports the document's form data from a stream in XFDF format.  
    Public MethodOverloaded. Imports the document's form data from a stream in XML format.  
    Public MethodOverloaded. Loads the document from a specified input stream, overwriting the current content of the document. The stream should contain valid PDF data and must be kept open while reading or modifying the document. If the document is modified, it can be saved using the Save(String,Boolean) or Save(Stream,Boolean) methods.  
    Public MethodMerges all or some pages from a specified GcPdfDocument into the current document.  
    Public MethodAdds a blank page to the document.

    The size of the new page is defined by the value of the PageSize property.

    If you want the new page to have a different size than the rest of the document, create the new page first, then set the Page.Size property.

     
    Public MethodOverloaded. Optimizes font usage by merging subsets of same fonts and by removing duplicate and unused fonts.

    This method uses the default values from OptimizeFontsOptions.

     
    Public MethodOverloaded. Applies all GrapeCity.Documents.Pdf.Annotations.RedactAnnotations to the current document.  
    Public MethodRegisters an indirect PDF object with the current document and returns the ID of the object as a GrapeCity.Documents.Pdf.Spec.PdfObjID.  
    Public MethodRemoves images with identical content from the current document.  
    Public MethodRemoves embedded fonts from the current document.

    Please note that a PDF may display incorrectly after removing embedded fonts. Use with caution.

     
    Public MethodReplaces a specified text on all pages of the current document.

    Note that the results may be affected by the current value of the RecognitionAlgorithm property.

     
    Public MethodOverloaded. Saves the current PDF document to a file using the default mode (no incremental update, not linearized).  
    Public MethodOverloaded. Saves the document pages as images in BMP format, one page per output file.

    The filePath parameter is used as a .NET format string, with current page number (1-based) passed to it as the value to be formatted. Note that if filePath does not contain a format item (such as "{0}"), all pages will be saved into the same file name, the last page overwriting everything else.

     
    Public MethodOverloaded. Saves the document pages as images in GIF format, one page per output file.

    The filePath parameter is used as a .NET format string, with current page number (1-based) passed to it as the value to be formatted. Note that if filePath does not contain a format item (such as "{0}"), all pages will be saved into the same file name, the last page overwriting everything else.

     
    Public MethodOverloaded. Iterates over the document pages and generates a GrapeCity.Documents.Imaging.GcBitmap for each page in the pageRange.  
    Public MethodOverloaded. Saves the document pages as images in JPEG format, one page per output file.

    The filePath parameter is used as a .NET format string, with current page number (1-based) passed to it as the value to be formatted. Note that if filePath does not contain a format item (such as "{0}"), all pages will be saved into the same file name, the last page overwriting everything else.

     
    Public MethodOverloaded. Saves the document pages as images in PNG format, one page per output file.

    The filePath parameter is used as a .NET format string, with current page number (1-based) passed to it as the value to be formatted. Note that if filePath does not contain a format item (such as "{0}"), all pages will be saved into the same file name, the last page overwriting everything else.

     
    Public MethodOverloaded. Saves the document pages as images in SVG format, one page per output file.

    The filePath parameter is used as a .NET format string, with current page number (1-based) passed to it as the value to be formatted. Note that if filePath does not contain a format item (such as "{0}"), all pages will be saved into the same file name, the last page overwriting everything else.

     
    Public MethodOverloaded. Saves the document pages as images to a stream in TIFF format, one page per frame.  
    Public Methodstatic (Shared in Visual Basic)Sets the license key.  
    Public MethodOverloaded. Signs and saves the current document to a stream. Note that stream must support read and seek operations.  
    Public MethodStarts document generation in sequential mode.

    In this mode, the content of the document is written directly into the underlying stream as soon as it is created, without the use of temporary files. When all content has been added, call EndDoc to finish creating the document.

     
    Public MethodOverloaded. Adds a document time stamp and saves the current document to a stream.  
    Top
    See Also