Table of Contents

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

format PaperFormat

The 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

format PaperFormat

The paper format.

dpi int

The 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

paperSizeInInches SKSize

The paper size in inches.

dpi int

The dots per inch (DPI) value.

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

paperSizeInInches SKSize

The paper size in inches.

dpi float

The dots per inch (DPI) value.

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

paperSizeInMillimeters SKSize

The paper size in millimeters.

dpi int

The dots per inch (DPI) value.

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

control SkiaControl
isTemplated bool
paper SKSize
scale float

Returns

List<PdfPagePosition>

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

content SKSize

The size of the content to be split.

paper SKSize

The size of the paper to split the content into.

Returns

List<PdfPagePosition>

A list of PdfPagePosition representing the positions of the pages.