The Address Relative Links Are Read Against
Say where the document was published, so its short links keep leading to the right place after it moves.
See It in a Real PDF
A Handbook That Says How It Wants to Be Read
Four pages that say how they want to be opened: which page comes up and how much of the window it fills, the chapters beside it, the pages two at a time, a print dialog already filled in — every one of them a wish reading software answers for itself.
Summary
Inside a document, a link can be written in short: « terms.html », with no start to the address. As long as the file stays beside that page, all is well; the day somebody downloads it and opens it at home, the short form leads nowhere. Written once at the top of the document, the full address of the place it came from is what the short forms are read against, wherever the file happens to be.
Technically
Written at the top level of a request, under
"base_uri"
base_uri writes /URI with its /Base in the catalogue, the address the document's relative links resolve against. A link to terms.html means nothing until the document says where it was published; that statement is what keeps such links alive once the file has been moved. Absolute links go where they say, whatever happens.
Request Schema
-
base_uri— string, optional, absent by default. The full address the document's relative addresses are read against, for instancehttps://hqf-pdf.com/en/handbook/.
It holds for every relative address the document carries: those of a link item with {"uri": "..."}, and those of a uri action. An absolute address is still read as it stands.
A Whole Request That Creates a PDF
{
"base_uri": "https://hqf-pdf.com/en/handbook/",
"standard_fonts": [{ "name": "sans", "face": "helvetica" }],
"items": [
{
"type": "text",
"rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 758 },
"content": ["Read the terms"],
"font": "sans",
"font_size": 12
},
{
"type": "link",
"rect": { "llx": 60, "lly": 738, "urx": 160, "ury": 760 },
"to": { "uri": "terms.html" }
}
]
}
The document as a whole
The Numbers Reading Software Shows A Hundred Letters in a Single File What the Document Says about Itself What the Document Says about Itself, Said Once Text Nobody Can Copy The Notes a Program Leaves in the File for Itself The Notes a Program Leaves on One Page The Data a Program Hangs on a Run of Ink A File Still Readable Decades from Now The Print Standard the Document Claims The Variable Print Standard the Document Claims The Password That Opens It, and What May Be Done with It An Invoice a Person and a Machine Both Read The PDF Version the File Declares The Extensions to PDF the File Says It Uses What a Picture Says about Itself, and How It Is Read The Attachments the Document Carries Beside Its Pages Files the Document Names without Carrying The Attachments Shown as a Portfolio Which Attachments a Page Claims Which Attachments a Font Claims The Identity Card a Single Font Carries Which Attachments the Document's Card Claims A Document Card Written Elsewhere The Areas of a Page a Reader Measures In The Identity Card a Single Page Carries The Accessibility Standard the Document Claims The Standards the Finished Document Is Measured Against
Where to Go Next
Every JSON key of a request, in one page The other forty-one settings of a request