Documents for PDF, .NET Edition Documentation
GcPdfDocument Class Members
Properties  Methods  Events

GrapeCity.Documents.Pdf Assembly > GrapeCity.Documents.Pdf Namespace : GcPdfDocument Class

The following tables list the members exposed by GcPdfDocument.

Public Constructors
 NameDescription
Public ConstructorCreates a new instance of the GcPdfDocument class, optionally specifying a license key.  
Top
Public Properties
 NameDescription
Public PropertyGets the GrapeCity.Documents.Pdf.AcroForms.AcroForm object defining common properties of the AcroForms in this document.  
Public PropertyGets the list of GrapeCity.Documents.Pdf.Articles.ArticleThread objects.  
Public PropertyGets the collection of embedded files associated with whole document. Typically it is used to identify which embedded file was the source of the PDF document.  
Public Propertystatic (Shared in Visual Basic)Gets or sets an object that implements the ICMapProvider interface. GcPdfDocument uses that interface to obtain an GrapeCity.Documents.Pdf.Text.CMap.CMap if it specified by name in the PDF file.

By default GcPdf tries to initialize this property automatically in the GcPdfDocument's constructor with the CMapProvider.Instance defined in the optional GrapeCity.Documents.Pdf.Resources package (which in this case needs to be explicitly referenced by the application).

 
Public PropertyGets or sets the compression level. Default value is System.IO.Compression.CompressionLevel.Fastest.  
Public PropertyGets or sets the PDF/A conformance level.

The default is none (the document does not conform to PDF/A).

 
Public PropertyGets or sets a DocumentInfo object that contains information about this document (author, title, etc).

Note: this property is not null by default (when a GcPdfDocument is created) but it can become null after a call to Load if the loaded document does not have a document info object.

 
Public PropertyGets the dictionary of document level file attachments.  
Public PropertyGets or sets the FileID object defining ID of this PDF document. Note that this ID is automatically updated if the Clear method is called.  
Public PropertyGets or sets the GrapeCity.Documents.Text.IFontCollection object used when the GcPdfDocument needs to find a GrapeCity.Documents.Text.Font (e.g. if it is not embedded in the PDF). If this property is null (the default), then the GrapeCity.Documents.Text.FontCollection.SystemFonts will be used.  
Public PropertyGets or sets a mode of font embedding.

The default is FontEmbedMode.EmbedSubset.

 
Public PropertyGets the collection of font handlers associated with the current document.  
Public PropertyGets the ImageOptions object that contains options controlling how images are processed in the current document.  
Public PropertyGets a value indicating whether compression is used when saving the document.  
Public PropertyGets or sets a value indicating whether newly added pages have landscape orientation.  
Public PropertyGets or sets a language identifier specifying the natural language for all text in the document except where overridden by language specifications for structure elements or marked content. If this entry is absent, the language is considered unknown.  
Public PropertyGets or sets a value indicating whether the loaded document is linearized, or whether the document should be generated and saved as linearized.

If creating a linearized document is desired, this property should be set prior to adding any content to the document, and must not be changed until the document has been saved.

 
Public PropertyGets a GrapeCity.Documents.Pdf.Structure.MarkInfo object provides additional information relevant to specialized uses of structured PDF documents.  
Public PropertyGets or sets the metadata associated with this document.  
Public PropertyGets the dictionary of destinations defined in the current document. The keys in this dictionary are the destinations' names.  
Public PropertyGets or sets a DestinationBase to be displayed or an GrapeCity.Documents.Pdf.Actions.ActionBase to be performed when the document is opened.  
Public PropertyGets the collection of the current document outlines.  
Public PropertyGets the dictionary of PageLabelingRange objects. Each key in this dictionary is the index of the first page in a labelling range.  
Public PropertyGets a rectangle that represents the surface of the current page (in points).  
Public PropertyGets the collection of Page objects that make up the document.  
Public PropertyGets or sets the default page size for the document (in points).  
Public PropertyGets or sets the page size for the document.  
Public PropertyGets or sets a value indicating whether the document is PDF/A compliant.  
Public PropertyGets or sets the PDF Version of the generated document.

By default the version is determined automatically based on which features are used in this document. Setting this property to a non-null string in the format "1.X" (where X is a digit from 0 to 9) overrides the automatic value with the specified one.

Setting this property to null or an empty string reverts to the default behavior.

 
Public PropertyGets the GrapeCity.Documents.Pdf.Security object that manages security for the current document (passwords, etc).  
Public PropertyGets a GrapeCity.Documents.Pdf.Structure.StructTreeRoot object that represents document's logical structure.  
Public PropertyGets the ViewerPreferences object that contains information specifying how the current document should be displayed.  
Public PropertyGets or sets a value indicating whether comments and some optional linebreaks will be added to the generated PDF file. Primarily useful for debugging.  
Top
Public Methods
 NameDescription
Public MethodClears the document, removing all content and resetting all properties and settings to their initial default values.  
Public MethodEnds document generation in sequential mode. This call must be preceeded 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 a text in the document's pages.  
Public MethodGets the list of fonts in this GcPdfDocument.  
Public MethodGets 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 MethodExtracts and returns all text from the current document.  
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 MethodLoads the current document from a specified intput 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) method.  
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. Saves the current PDF document to a file.  
Public MethodSaves the document pages as images in BMP format, one page per output file.

The fileName 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 fileName 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 MethodSaves the document pages as images in GIF format, one page per output file.

The fileName 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 fileName 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 MethodSaves the document pages as images in JPEG format, one page per output file.

The fileName 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 fileName 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 MethodSaves the document pages as images in PNG format, one page per output file.

The fileName 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 fileName 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. 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.

 
Top
Public Events
 NameDescription
Public EventFires periodically while data is written into the PDF document.  
Public EventFires while pages are written to the PDF stream after a call to the Save(Stream,Boolean) method.  
Top
See Also

Reference

GcPdfDocument Class
GrapeCity.Documents.Pdf Namespace