[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.PrintManager.Draw

Draw Method

Draw(Page, IList<PageInfo>, int, int, Order, PdfSaveOptions)

Draws the pages in a page collection onto a PDF page.

This method divides the target PDF page into a grid defined by rows and columns, then draws the specified PageInfo objects into that layout. This overload uses OverThenDown by default when placing pages.

Declaration
public void Draw(Page page, IList<PageInfo> pages, int rows, int columns, Order order = Order.OverThenDown, PdfSaveOptions options = null)
Public Sub Draw(page As Page, pages As IList(Of PageInfo), rows As Integer, columns As Integer, Optional order As Order = Order.OverThenDown, Optional options As PdfSaveOptions = Nothing)
Parameters
Type Name Description
Page page

The target PDF page. Must not be null.

IList<PageInfo> pages

The page collection to draw. Must not be null.

int rows

The number of rows used to divide the target page layout. Must be greater than 0.

int columns

The number of columns used to divide the target page layout. Must be greater than 0.

Order order

The direction used to arrange the pages in the target layout.

PdfSaveOptions options

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

Examples
worksheet.Range["A1:B4"].Value = new object[,]
{
    { "Name", "Value" },
    { "A", 100 },
    { "B", 200 },
    { "C", 300 }
};
PrintManager printManager = new PrintManager();
IList<PageInfo> pages = printManager.Paginate(worksheet);
GcPdfDocument doc = new GcPdfDocument();
GrapeCity.Documents.Pdf.Page page = doc.NewPage();
printManager.Draw(page, pages, 1, 1);

Draw(Page, PointF, IRange, PdfSaveOptions)

Draw the range data to the specific location in a specified pdf page.

Declaration
public void Draw(Page page, PointF location, IRange range, PdfSaveOptions options = null)
Public Sub Draw(page As Page, location As PointF, range As IRange, Optional options As PdfSaveOptions = Nothing)
Parameters
Type Name Description
Page page

The page in a GcPdfDocument.

PointF location

The location of the range data to be drawn.

IRange range

The print data range.

PdfSaveOptions options

Options for saving pdf file.

Examples
worksheet.Range["A1:B2"].Value = new object[,]
{
    { "Name", "Value" },
    { "Test", 100 }
};
IRange range = worksheet.Range["A1:B2"];
PrintManager printManager = new PrintManager();
GcPdfDocument doc = new GcPdfDocument();
GrapeCity.Documents.Pdf.Page page = doc.NewPage();
printManager.Draw(page, new PointF(36, 72), range);

Draw(Page, RectangleF, IRange, PdfSaveOptions)

Draw the range data to the specific location in a specified pdf page.

Declaration
public void Draw(Page page, RectangleF rect, IRange range, PdfSaveOptions options = null)
Public Sub Draw(page As Page, rect As RectangleF, range As IRange, Optional options As PdfSaveOptions = Nothing)
Parameters
Type Name Description
Page page

The page in a GcPdfDocument.

RectangleF rect

The location and size of the range data to be drawn.

IRange range

The print data range.

PdfSaveOptions options

Options for saving pdf file.

Examples
worksheet.Range["A1:B2"].Value = new object[,]
{
    { "Name", "Value" },
    { "Test", 100 }
};
IRange range = worksheet.Range["A1:B2"];
PrintManager printManager = new PrintManager();
GcPdfDocument doc = new GcPdfDocument();
GrapeCity.Documents.Pdf.Page page = doc.NewPage();
printManager.Draw(page, new RectangleF(36, 72, 240, 120), range);

Draw(Page, RectangleF, PageContentInfo, PdfSaveOptions)

Draw the page info to the specific location in a specified pdf page.

Declaration
public void Draw(Page page, RectangleF rect, PageContentInfo pageContent, PdfSaveOptions options = null)
Public Sub Draw(page As Page, rect As RectangleF, pageContent As PageContentInfo, Optional options As PdfSaveOptions = Nothing)
Parameters
Type Name Description
Page page

The page in a GcPdfDocument.

RectangleF rect

The location and size of the data to be drawn.

PageContentInfo pageContent

The printed page content info.

PdfSaveOptions options

Options for saving pdf file.

Examples
worksheet.PageSetup.PrintArea = "A1:B4";
worksheet.Range["A1:B4"].Value = new object[,]
{
    { "Name", "Value" },
    { "A", 100 },
    { "B", 200 },
    { "C", 300 }
};
PrintManager printManager = new PrintManager();
PageContentInfo pageContent = printManager.Paginate(worksheet)[0].PageContent;
GcPdfDocument doc = new GcPdfDocument();
GrapeCity.Documents.Pdf.Page page = doc.NewPage();
printManager.Draw(page, new RectangleF(36, 72, 360, 240), pageContent);

Draw(Page, RectangleF, PageInfo, PdfSaveOptions)

Draw the page info to the specific location in a specified pdf page.

Declaration
public void Draw(Page page, RectangleF rect, PageInfo pageInfo, PdfSaveOptions options = null)
Public Sub Draw(page As Page, rect As RectangleF, pageInfo As PageInfo, Optional options As PdfSaveOptions = Nothing)
Parameters
Type Name Description
Page page

The page in a GcPdfDocument.

RectangleF rect

The location and size of the data to be drawn.

PageInfo pageInfo

The printed page info.

PdfSaveOptions options

Options for saving pdf file.

Examples
worksheet.PageSetup.PrintArea = "A1:B4";
worksheet.Range["A1:B4"].Value = new object[,]
{
    { "Name", "Value" },
    { "A", 100 },
    { "B", 200 },
    { "C", 300 }
};
PrintManager printManager = new PrintManager();
PageInfo pageInfo = printManager.Paginate(worksheet)[0];
GcPdfDocument doc = new GcPdfDocument();
GrapeCity.Documents.Pdf.Page page = doc.NewPage();
printManager.Draw(page, new RectangleF(36, 72, 360, 240), pageInfo);