Skip to content

Novis\Pdf\Rendered

The result of Document::render: the PDF file, its pages, and what the render could not draw. To print a page number inside the same document, such as in a table of contents, use the CSS function target-counter().

Returned by

You get a Novis\Pdf\Rendered from these methods:

Members

1 member.

MemberSignature
constructorconstructor(bytes $bytes, uint $pageCount, array<Page> $pages, array<Dropped> $dropped, array<MissingGlyph> $missingGlyphs, array<Overflow> $overflows): void

Types

Dropped

type Dropped = {    property: string,    value: string,    selector: string,    line: uint,    column: uint,};

MissingGlyph

type MissingGlyph = { text: string, fonts: array<string>, page: uint };

Overflow

type Overflow = { page: uint, area: string, text: string };

Properties

  • $rendered->bytesbytesthe PDF file
  • $rendered->pageCountuintthe number of pages in the PDF file
  • $rendered->pagesarray<Page>one Page for each page of the PDF file, with its string-set values and its marks
  • $rendered->droppedarray<Dropped>the CSS the render does not support, with the line and column of each declaration
  • $rendered->missingGlyphsarray<MissingGlyph>the text that no font has, with the fonts tried and the page
  • $rendered->overflowsarray<Overflow>the HTML that is too tall for its cell, with its page and area

Example apps

These complete apps use this class. You can download and run each one.

  • PDF documents: A small web app that makes three PDF files. They are an invoice, an encrypted report and event tickets. See each file, then run the app and its tests.