Class Pdf
- Namespace
- DrawnUi.Infrastructure
- Assembly
- DrawnUi.Maui.dll
public static class Pdf
- Inheritance
-
Pdf
- Inherited Members
Methods
GetPaperSizeInInches(PaperFormat)
Gets the paper size in inches for a given paper format.
public static SKSize GetPaperSizeInInches(PaperFormat format)
Parameters
formatPaperFormatThe paper format.
Returns
- SKSize
The paper size in inches as an SKSize.
GetPaperSizePixels(PaperFormat, int)
Gets the paper size in pixels for a given paper format and DPI.
public static SKSize GetPaperSizePixels(PaperFormat format, int dpi)
Parameters
formatPaperFormatThe paper format.
dpiintThe dots per inch (DPI) value.
Returns
- SKSize
The paper size in pixels as an SKSize.
GetPaperSizePixels(SKSize, int)
Gets the paper size in pixels for a custom paper size in inches and DPI.
public static SKSize GetPaperSizePixels(SKSize paperSizeInInches, int dpi)
Parameters
Returns
- SKSize
The paper size in pixels as an SKSize.
GetPaperSizePixels(SKSize, float)
Calculates the paper size in pixels based on the paper size in inches and DPI.
public static SKSize GetPaperSizePixels(SKSize paperSizeInInches, float dpi)
Parameters
Returns
- SKSize
The paper size in pixels as an SKSize.
GetPaperSizePixelsFromMillimeters(SKSize, int)
Gets the paper size in pixels for a custom paper size in millimeters and DPI.
public static SKSize GetPaperSizePixelsFromMillimeters(SKSize paperSizeInMillimeters, int dpi)
Parameters
Returns
- SKSize
The paper size in pixels as an SKSize.
SplitStackToPages(SkiaControl, bool, SKSize, float)
Pages will be split upon first found vertical stick children. Must specify if stack is templated. If no stack is found will split to pages as usual.
public static List<PdfPagePosition> SplitStackToPages(SkiaControl control, bool isTemplated, SKSize paper, float scale = 1)
Parameters
controlSkiaControlisTemplatedboolpaperSKSizescalefloat
Returns
SplitToPages(SKSize, SKSize)
Splits a SkiaStack content into multiple pages based on the provided paper size, considering height only.
public static List<PdfPagePosition> SplitToPages(SKSize content, SKSize paper)
Parameters
contentSKSizeThe size of the content to be split.
paperSKSizeThe size of the paper to split the content into.
Returns
- List<PdfPagePosition>
A list of PdfPagePosition representing the positions of the pages.