Some test text!

Info dictionarykeyboard_arrow_down

Information dictionary: adding custom data to a PDF in Go

To add custom data to an existing document.

// In case you have PDFDoc you can always access
// SDF/Cos document using PDFDoc.GetSDFDoc() method
doc := NewSDFDoc(filename)
trailer := doc.GetTrailer()  // Get the trailer

// Create an Info dictionary
info = trailer.PutDict("Info")
info.PutString("Producer", "PDFTron PDFNet")

// Create a custom inline dictionary within Info dictionary
customDict := info.PutDict("My Direct Dict")
customDict.PutNumber("My Number", 100)     // Add some key/value pairs

Cos/SDF low-level API to edit PDF files Full code sample which illustrates how to use basic Cos/SDF API to edit an existing document.

Get the answers you need: Support


Free Trial

Get unlimited trial usage of PDFTron SDK to bring accurate, reliable, and fast document processing capabilities to any application or workflow.

Select a platform to get started with your free trial.

Unlimited usage. No email address required.