This repository contains practical examples of Template Layout configurations used for auto-tagging non-tagged PDFs with the PDFix SDK and PDFix Desktop.
Templates describe how to detect visual patterns in PDFs (tables, headers, footers, text blocks, etc.) and map them to accessible tagged structures (like headings, paragraphs, and tables) — all through a flexible, human-readable JSON format.
Each example directory includes:
original.pdf
– Unstructured, non-tagged source PDForiginal.json
– Template Layout file for structure detectionoriginal_tagged.pdf
– Output PDF with semantic tagging
You can use these templates programmatically in your SDK projects. See AddTags
examples in official SDK sample repos:
Typical workflow:
pdfix = GetPdfix()
doc = pdfix.OpenDoc("original.pdf", "")
tmpl = doc.GetTemplate()
tmplStm = pdfix.CreateFileStream("original.json", kPsReadOnly)
tmpl.LoadFromStream(tmplStm, kDataFormatJson)
tmplStm.Destroy()
tagsParams = PdfTagsParams()
doc.AddTags(tagsParams)
doc.Save("original_tagged.pdf", kSaveFull)
doc.Close()
Use PDFix CLI to apply templates without writing any code.
Basic command:
pdfix_app add-tags -i original.pdf -o original_tagged.pdf -c original.json
Full CLI documentation: PDFix CLI: AddTags Command
- Open PDFix Desktop
- Load an
original.pdf
file - Run Accessibility -> AutoTag
- Load the
original.json
- Click Run to generate a tagged PDF
For more information, visit the user's guide: Auto-Tag
Read the PDFix Template Layout Guide for syntax and design best practices.
Found a layout worth templating? Want to improve an example?
- Fork this repository
- Add your new folder with
original.pdf
,template.json
, andtagged.pdf
- Include a short
README.md
for context - Open a pull request!
Made with 💡 by the PDFix Team and the community