[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.PrintManager.AppendPage

AppendPage Method

AppendPage(GcPdfDocument, PageInfo, PdfSaveOptions)

Appends the specified printed page to a PDF document.

This method creates a new PDF page in doc by using the paper size defined by pageInfo, and then draws the page content onto the appended page. Use Paginate(IWorksheet) to generate the PageInfo instance before calling this method.

The options argument controls PDF rendering behavior. Pass null if no PdfSaveOptions are needed.

Declaration
public void AppendPage(GcPdfDocument doc, PageInfo pageInfo, PdfSaveOptions options = null)
Public Sub AppendPage(doc As GcPdfDocument, pageInfo As PageInfo, Optional options As PdfSaveOptions = Nothing)
Parameters
Type Name Description
GcPdfDocument doc

The PDF document that receives the appended page. Must not be null.

PageInfo pageInfo

The printed page information to append. Must not be null.

PdfSaveOptions options

The PDF save options applied when drawing the page content; may be null.

Examples
worksheet.Range["A1:B3"].Value = new object[,]
{
    { "Name", "Value" },
    { "A", 100 },
    { "B", 200 }
};
PrintManager printManager = new PrintManager();
PageInfo pageInfo = printManager.Paginate(worksheet)[0];
PdfSaveOptions options = new PdfSaveOptions();
GcPdfDocument doc = new GcPdfDocument();
printManager.AppendPage(doc, pageInfo, options);