Skip to content

Novis\Pdf\Page

One page of a document. Document::render calls a header or footer function once for each page, with that page's Page. After the render, Rendered::pages has one Page for each page.

Members

6 members.

MemberSignature
constructorconstructor(uint $number, uint $count, ?string $name, array<Named> $strings, array<array<Named>> $marks): void
isFirstisFirst(): bool
isLastisLast(): bool
stringstring(string $name): ?string
marksmarks(string $name): array<string>
marksUpTomarksUpTo(string $name): array<string>

Types

Named

type Named = { name: string, value: string };

Properties

  • $page->numberuintthe number of this page, starting at 1
  • $page->countuintthe number of pages in the document
  • $page->name?stringthe page name from the CSS page property of the first block on this page. It is null when the page has no name.

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.