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 PDF outline/bookmark pointing to this page.
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 named destination on this page.
Adds a JPEG or PNG image from a path or binary.
Adds a line operation.
Adds a URI link annotation over a rectangular area.
Adds an internal link annotation to a named destination.
Adds an ordered or unordered list.
Creates a new page.
Adds a paragraph using the multiline text-box layout engine.
Adds a rectangle operation.
Adds a basic table.
Adds a line of text.
Adds wrapped multiline text.
Types
@type operation() :: {:text, binary(), keyword()} | {:text_box, binary(), keyword()} | {:line, keyword()} | {:rectangle, keyword()} | {:circle, keyword()} | {:image, binary(), keyword()} | {:link, binary(), keyword()} | {:link_to, binary() | atom(), keyword()} | {:destination, binary() | atom(), keyword()} | {:bookmark, binary(), keyword()}
@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 PDF outline/bookmark pointing to this page.
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 named destination on this page.
Adds a JPEG or PNG image from a path or binary.
Adds a line operation.
Adds a URI link annotation over a rectangular area.
Adds an internal link annotation to a named destination.
Adds an ordered or unordered list.
Creates a new page.
Adds a paragraph using the multiline text-box layout engine.
Adds a rectangle operation.
Adds a basic table.
Rows are lists of cell values. Table cells are drawn with rectangles and text operations so they work with the normal font pipeline.
Adds a line of text.
Adds wrapped multiline text.