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

In This Topic
    GcPdfDocument Class
    In This Topic
    Represents a PDF document.

    The object model provided by this class follows the PDF 1.7 Reference specification.

    Object Model
    GcPdfDocument Class
    Syntax
    'Declaration
     
    Public Class GcPdfDocument 
    public class GcPdfDocument 
    Remarks

    To create a PDF document, create an instance of the GcPdfDocument class.

    Two approaches are possible for adding content and saving the document:
    • In this mode, you add pages to the document and draw on them (see below) in arbitrary order. In particular, you can modify pages that have been already created. When done, use Save(Stream,Boolean) or Save(String,Boolean) method to save the document. This mode is convenient but uses temporary files, so is somewhat less efficient than sequential mode described next.
    • To use this mode, you call StartDoc prior to any other operations on the document. You can then add pages and draw on them, but you can only draw on the last (current) page. All content is immediately added to the underlying stream without the use of temporary files. To complete creating the document, you must call EndDoc.
    The pages of the document are accessible via the Pages collection. To add content, use Page.Graphics property to get a GrapeCity.Documents.Drawing.GcGraphics for a page. (In sequential mode, only the currently last page of the document can be drawn on.) You can then use that graphics object to draw the desired content.
    Inheritance Hierarchy

    System.Object
       GrapeCity.Documents.Pdf.GcPdfDocument

    See Also