Each subdirectory is a self-contained example that produces a PDF.
go run ./examples/helloexamples/
├── hello/ # minimal one-page PDF
├── rtl/ # right-to-left script shaping (Arabic, Hebrew)
├── indic/ # Indic script shaping (Devanagari first)
├── cjk/ # Chinese, Japanese, Korean with font subsetting
├── fonts/ # standard, custom, and Unicode fonts (CJK, Cyrillic)
├── barcodes/ # QR Code (all ECC levels), Code 128, and EAN-13
├── links/ # hyperlinks, bookmarks, internal navigation
├── forms/ # interactive AcroForm fields (text, checkbox, radio, dropdown)
├── html-to-pdf/ # rich HTML+CSS report (flexbox, tables, page breaks)
├── import-page/ # load existing PDF as template, add content on top
├── merge/ # parse, merge, and extract text from PDFs
├── redact/ # permanently remove sensitive text (SSNs, emails, PII)
├── report/ # multi-page report with layout API (tables, lists, columns)
├── table-rowspan/ # table cells spanning multiple rows and columns
├── sign/ # PAdES digital signature with self-signed certificate
├── zugferd/ # PDF/A-3B invoice with Factur-X XML attachment
└── README.md
- Create a new directory under
examples/(e.g.,examples/invoice/). - Add a single
main.gothat produces one PDF. - Include any required data files in the same directory (XML, images, etc.).
- Keep it self-contained — no shared code between examples.
- Add a doc comment at the top of
main.godescribing what the example does and how to run it. - Add the directory to the structure list above.