Default Placeholders in IronPDF

IronPDF ships with built-in placeholders that resolve to dynamic values when a PDF is rendered. Drop them into your HTML content or into the HtmlFragment property of an HtmlHeaderFooter, and the ChromePdfRenderer swaps them for real values at render time.

The available placeholders are:

  • {date}: current date
  • {time}: current time
  • {page}: current page number
  • {total-pages}: total number of pages
  • {url}: document URL
  • {html-title}, {PDF-title}, {pdf-title}: document title

Used inside an HtmlHeader, HtmlFooter, or HtmlFragment object, these tokens are interpreted and replaced automatically during PDF generation.

Preventing Placeholder Replacement

Sometimes you want a placeholder to appear as literal text rather than have IronPDF resolve it. To stop the automatic substitution, change the token so the renderer no longer recognizes it.

  • Alter the syntax: write something like {page_} instead of {page} so it no longer matches a known placeholder.
  • Hide it from the renderer: wrap the text in a non-rendered element, such as an HTML comment or a span with display:none.

Either approach leaves the text untouched in the final output.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More
Ready to Get Started?
Nuget Downloads 19,680,294 | Version: 2026.7 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast? PM > Install-Package IronPdf
run a sample watch your HTML become a PDF.