Table of Contents

Class CadPdfWriter

Namespace
OpenCAD2D.Wpf
Assembly
OpenCAD2D.Rendering.dll

The presenter's plotter, OpenCAD2D PDF: writes a plot as one page of a PDF through SkiaSharp's SKDocument.CreatePdf, in vectors, from the display list the canvas draws. Lines keep their lineweights, hatches and solids are filled, and the text of a TrueType font is written as text with its font embedded, cut to the glyphs used, so that a reader finds and copies it; the text of an SHX font is its strokes, as the canvas draws it, and is not found unless the settings carry PDFSHX (PdfShx), which writes the words again over the strokes in letters no eye sees. A plot stamp the settings carry (PlotStamp) is drawn in a corner of the sheet as text, and its line added to the stamp's log file. Several plots, as EXPORTPDF's All layouts, are written as one PDF of a page each (WritePages(string, CadDocument, IReadOnlyList<CadPlotJob>)), and those of several drawings, as PUBLISH writes them, by WritePages(string, IReadOnlyList<CadDocument>, IReadOnlyList<CadPlotJob>). Settings that carry PdfHyperlinks make the first hyperlink of each object plotted a link of the page over the object's box.

public static class CadPdfWriter
Inheritance
CadPdfWriter
Inherited Members

Remarks

The page is the sheet as it lies, to a ten-thousandth of a point: ISO A3 on its side is 1 190.5512 by 841.8898 points (420 by 297 mm), where SkiaSharp alone writes 1 191 by 842. A plot whose area is empty writes no file.

Methods

Write(Stream, CadDocument, CadSpace, CadPlotSettings, DisplayBox)

Writes a plot of a space as a PDF of one page to a stream.

Write(string, CadDocument, CadSpace, CadPlotSettings, DisplayBox)

Writes a plot of a space to a PDF file of one page, replacing a file of the name.

WritePages(string, CadDocument, IReadOnlyList<CadPlotJob>)

Writes plots of several spaces to one PDF file of a page each, in their order, replacing a file of the name, as EXPORTPDF writes All layouts: each page the size of its own sheet, stamped by its own settings, the stamp's lines added to its log once for each page.

WritePages(string, IReadOnlyList<CadDocument>, IReadOnlyList<CadPlotJob>)

Writes plots of spaces of several drawings to one PDF file of a page each, in their order, replacing a file of the name, as PUBLISH writes a multi-sheet PDF: the page of each plot is the size of its own sheet, its plot drawn from its own drawing, and stamped by its own settings. Three sheets, the model of one drawing and a layout on ISO A3 and one on ISO A1 of another, are a PDF of three pages.

WritePages(string, IReadOnlyList<CadDocument>, IReadOnlyList<CadPlotJob>, IReadOnlyList<CadPdfBookmark>, Action<int>)

Writes plots of spaces of several drawings to one PDF file as WritePages(string, IReadOnlyList<CadDocument>, IReadOnlyList<CadPlotJob>) does, with an outline of bookmarks, and tells before each page is drawn. A published sheet set's PDF has one bookmark, Sheets and Views, and under it a bookmark for each page.