Represents a PDF page and its drawing operations.
Pages store high-level operations until they are added to a document.
Summary
Functions
Compiles the page and adds it to a document.
Adds a circle operation.
Compiles the page operations into an uncompressed content-stream binary.
Returns the bottom content boundary.
Returns the usable page height after margins.
Returns the left content boundary.
Returns the top content boundary.
Returns the usable page width after margins.
Adds a JPEG or PNG image from a path or binary.
Adds a line operation.
Creates a new page.
Adds a rectangle operation.
Adds a line of text.
Adds wrapped multiline text.
Types
@type t() :: %PaperForge.Page{ height: number(), margins: PaperForge.Margins.t(), operations: [operation()], origin: PaperForge.Coordinates.origin(), width: number() }
Functions
@spec add_to_document(t(), PaperForge.Document.t()) :: PaperForge.Document.t()
Compiles the page and adds it to a document.
Adds a circle operation.
Compiles the page operations into an uncompressed content-stream binary.
This function is retained for compatibility with PaperForge v0.1.0. Image operations require a document and therefore cannot be compiled through this function.
Returns the bottom content boundary.
Returns the usable page height after margins.
Returns the left content boundary.
Returns the top content boundary.
Returns the usable page width after margins.
Adds a JPEG or PNG image from a path or binary.
Adds a line operation.
Creates a new page.
Adds a rectangle operation.
Adds a line of text.
Adds wrapped multiline text.