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.
Written at the top level of a request, under
"base_uri"
In plain words
Written for anybody. It says what this puts on a sheet of paper, and asks nothing of you beyond that.
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 someone downloads it and opens it at home, the short form leads nowhere. You settle that by writing once, in the document, the full address of the place it came from. The short forms are then read from there, wherever the file happens to be.
For a developer
Written for somebody who writes the calling program: the model, the units, and the settings that carry the weight.
base_uri states 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.
Every key, with its default
The reference: which keys are required, which are optional, what each one defaults to and which combinations the server declines.
-
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 draws it
Post this as it stands and a PDF comes back. Nothing has been left out of it.
{
"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 the reader shows A hundred letters in a single file What the document says about itself A file still readable in thirty years An invoice a person and a machine both read The PDF version the file declares What an image says about itself
Where to go next
Every key of a request, in one page The other thirty-two settings of a request