Variables
Display dynamic values based on your document, such as page numbers and running headers.
PageNumber
Support
Returns the current page number.
Examples
Preview
Custom Style
You can use a custom CSS counter-style, by passing a known name or a custom counter style.
API
The style of the counter.
Default: "decimal"
PagesNumber
Support
Returns the total number of pages.
Examples
Preview
API
The style of the counter.
Default: "decimal"
RunningH1
Support
Returns the current page’s running header of level 1.
Examples
Preview
Show the current running header of level 1 in the page header. All running headers are reset when any of their parent headings are encountered (e.g. a level 2 heading resets the level 3, 4, 5 and 6 headings).
RunningH2
Support
Returns the current page’s running header of level 2.
import { RunningH2 } from "@onedoc/react-print";
RunningH3
Support
Returns the current page’s running header of level 3.
import { RunningH3 } from "@onedoc/react-print";
RunningH4
Support
Returns the current page’s running header of level 4.
import { RunningH4 } from "@onedoc/react-print";
RunningH5
Support
Returns the current page’s running header of level 5.
import { RunningH5 } from "@onedoc/react-print";
RunningH6
Support
Returns the current page’s running header of level 6.
import { RunningH6 } from "@onedoc/react-print";