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.

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 instance https://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 line that sends it, in three languages

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 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 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 What a picture says about itself, and how it is read The attachments the document carries beside its pages The attachments shown as a portfolio Which attachments a page claims 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

See the prices See the examples