PeachDrawing.PDF
PdfComposerPage Class
One page of a PdfComposer: the canvas to draw it with, and the links that make parts of it clickable.
public sealed class PdfComposerPage
Inheritance System.Object → PdfComposerPage
Remarks
Positions given to a page are in points, measured from its top-left corner with y running down, the way the page is drawn; the page converts to PDF’s own convention (y up from the bottom edge) itself.
| Properties | |
|---|---|
| Canvas | The canvas made with the composer’s PdfRenderContext when the page was added. |
| HeightPoints | The page’s height in points. |
| Index | The zero-based position of the page in the document. |
| WidthPoints | The page’s width in points. |
| Methods | |
|---|---|
| AddDestinationLink(Rect, string, IReadOnlyList<PaintPoint>) | Makes bounds a link to a place in the document that was named with AddNamedDestination(string, int, double). |
| AddLink(Rect, string, IReadOnlyList<PaintPoint>) | Makes bounds a link to a web address (or any other URI). |
| CreateCanvas(PdfRenderContext) | Makes another canvas over this page’s content, drawing with renderContext. The canvases of one page share its content but each keeps its own transform and clip bookkeeping, so one made for a piece of work can be disposed when that is done. |
| Finish() | Ends drawing on the page: its content is written and its canvases can no longer be used. Links can still be added. Called for every page when the composer is saved; call it earlier to release the page’s drawing state as soon as it is drawn. |
| SetCustomString(string, string, string) | Sets a custom string entry in a dictionary associated with the page. |
| SetPrintBoxes(double, double) | Makes the sheet larger than the page, for print production: the page box (the size given to AddPage(double, double)) becomes the /TrimBox, the /BleedBox extends it by bleedPoints on every side, and the /MediaBox extends it by bleedPoints plus outsidePoints, which is room for printer’s marks. |
| Shift(double, double) | Moves everything drawn on the page from now until the returned scope is disposed by (xPoints, yPoints) points, whichever canvas draws it. Disposing the scope puts the page back as it was. |