Canvas interface¶
The Canvas interface allows rendering of pages to a variety of output devices, including HD HTML, PNG, and PDF.
The Canvas object also allows post-processing / image manipulation of output such as annotations, redaction, bates stamping, or general drawing.
To obtain this interface, call the DocumentFilters.MakeOutputCanvas or DocumentFilters.MakeOutputCanvasOnStream methods.
Note The drawing API is available for bitmap and PDF outputs only.
Canvas::AddCustomMetadata method | Add a custom metadata field to the output canvas. This function MUST be called before the first call to RenderPage. |
Canvas::Annotate method | The Annotate method draws the given annotation onto the current page. The annotation is delivered as a string of JSON text. The schema for Annotations can be found in the Document Filters installation directory in “Annotation-Schema.json”. |
Canvas::AppendBookmark method | Appends only this current bookmark. This function does not enumerate the Children bookmarks. |
Canvas::AppendBookmarkRecursive method | Appends this bookmark and the and it's children recursively. |
Canvas::Arc method | The Arc method draws an arc on the image along the perimeter of the ellipse, bounded by the specified rectangle. It uses the current Pen. |
Canvas::BlankPage method | Create a blank page on the canvas with the specified properties. |
Canvas::Chord method | The Chord method draws a closed figure represented by the intersection of a line and an ellipse. The ellipse is bisected by a line that runs between X3, Y3 and X4, Y4 coordinates. |
Canvas::ClearBookmarks method | Remove existing bookmarks from the canvas. |
Canvas::Close method | Close the canvas object, disposing of any resources. |
Canvas::DrawImage method | DrawImage renders an image from a buffer onto the Canvas. |
Canvas::DrawScaleImage method | DrawScaleImage renders an image from a buffer onto the Canvas. The image is scaled to a specified size. |
Canvas::Ellipse method | The Ellipse method draws the ellipse defined by a bounding rectangle on the canvas, outlined with the current pen and filled with the current brush. |
Canvas::Handle property | Returns the internal HCANVAS handle for the canvas object. |
Canvas::LineTo method | LineTo draws a line on the canvas from current pen position to the point specified by X and Y, and sets the pen position to (X, Y) coordinates. |
Canvas::MoveTo method | MoveTo changes the current drawing position to the point (X, Y). |
Canvas::Pie method | The Pie method draws a pie-shaped section of the ellipse on the canvas, bounded by the rectangle (X, Y) and (X2, Y2). |
Canvas::Rect method | The Rect method draws a rectangle using the Brush and Pen of the canvas to fill and draw the border. |
Canvas::RenderPage method | Render a page to the canvas using default options. |
Canvas::RenderPages method | Render all pages of the extractor to the canvas. |
Canvas::RoundRect method | RoundRect draws a rectangle with rounded corners on the canvas, outlined with the current pen and filled with the current brush. |
Canvas::SetBrush method | SetBrush updates the current brush on the canvas with the given color and style. Brushes are used when drawing rectangles and text. |
Canvas::SetFont method | SetFont specifies the font to be used when drawing text to the canvas. All subsequent calls to TextOut and MeasureText will use this font. |
Canvas::SetOpacity method | SetOpacity sets the opacity or transparency for future drawing routines. |
Canvas::SetPen method | SetPen updates the canvas pen with the specific color, width, and style. |
Canvas::TextOut method | TextOut writes a string on the canvas, starting at (X, Y). It updates the pen position to the end of the string and uses the current font and brush. |
Canvas::TextRect method | Writes a string inside a clipping rectangle, using the current brush and font. |
Canvas::TextWidth method | Returns the width in pixels, of a string if rendered with the current font. |
Canvas::TextHeight method | Returns the height in pixels, of a string if rendered with the current font. |