A patch of page a reader clicks

Make a patch of page clickable: it opens a web address, or takes the reader to another page of the same document.

Summary

It is invisible: it lies over whatever is already drawn, usually over a piece of text you coloured blue so people can see it is clickable. A jump inside the document works the way a table of contents does — the reader lands on the right page without scrolling for it. On paper the sheet stays as it is; on screen, the patch turns your document into something you browse.

Technically

Asked for with "type": "link"

A link is a /Subtype /Link annotation laid over the items already drawn, its /Rect given in points: it makes do with the pages those items created, so a link named beyond the last page simply stays aside. Its target is written in two ways: the short form, which gives an address or a page number, or the full action, which further gives the view a page opens at, a named destination, a document part, a reading move, the sending and the resetting of a form, and the showing and the hiding of the fields it names. Whichever is written, the annotation has either a /Dest or an /A action, never both at once: each link states one or the other, which keeps a single possible reading.

Request schema

Required key: rect. Exactly one target key: to, either {"uri": "address"} or {"page": n} with n ≥ 1; or action, one of {"uri": …} (a string, or an object with a required uri and track_pointer, default false), {"page": …} (an integer ≥ 1, or an object with a required page and a fit, default "whole_page"), {"destination": "name"}, {"part": n} with n ≥ 1, {"menu_item": …} being next_page, previous_page, first_page or last_page, {"transition": {"effect": …, "seconds": …}}, which shows the page viewing area as the action before it left it, brought in by that transition, and takes the same effect and seconds a page takes, {"reset_fields": {"fields": …}}, {"submit_fields": {…}} with a required url, an optional fields and a format (default {"fdf": {"with_no_value": false}}, also {"html": {"get": …, "with_click": …}}, "xfdf" and {"whole_document": {"get": …}}), {"import_fields": {"file": "name"}}, {"show": ["field", …]} or {"hide": ["field", …]}. A field set is written {"only": …} or {"all_but": …}; absent, it means the whole form. show brings the fields named back into view and hide takes them out of it, each name being the name a field reports its answer under, every field nested under it following; a name the document does not carry is refused, and a field out of view keeps its answer, which a form that is sent carries. In part, n is a page number and not the rank of a part: the reader is taken to the part that claims page n, and a page no part claims is refused. Optional: highlight, what reading software shows while the pointer is held down on it, one of none, invert, outline or push; absent leaves it to the reading software. over, an array of quadrilaterals, each four [x, y] corners counterclockwise from the one its bottom edge starts at, the patches of page it is clickable over; absent leaves its rectangle the whole of it, which is what a sentence on one line takes. description, a string, what the link leads to said in words; border, the frame drawn around it, absent drawing none; layer, the name of a declared layer. pages, an array of one-based integers, default empty. Cross refusals: to together with action; neither of the two; a page outside the document.

A whole request that creates a PDF

{
  "standard_fonts": [{"name": "sans", "face": "helvetica"}],
  "items": [
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 740, "urx": 300, "ury": 760},
      "content": ["Visit hqf-pdf.com"],
      "font": "sans",
      "font_size": 14,
      "color": [0.11, 0.31, 0.55]
    },
    {
      "type": "link",
      "rect": {"llx": 72, "lly": 740, "urx": 300, "ury": 760},
      "to": {"uri": "https://hqf-pdf.com/"},
      "border": { "solid": { "color": [0.11, 0.31, 0.55], "width": 0.5 } },
      "highlight": "invert"
    },
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 700, "urx": 300, "ury": 720},
      "content": ["Read on"],
      "font": "sans",
      "font_size": 14,
      "color": [0.11, 0.31, 0.55]
    },
    {
      "type": "link",
      "rect": {"llx": 72, "lly": 700, "urx": 300, "ury": 720},
      "action": {"menu_item": "next_page"}
    },
    {
      "type": "text",
      "rect": {"llx": 72, "lly": 740, "urx": 300, "ury": 760},
      "content": ["The page the move lands on"],
      "font": "sans",
      "font_size": 14,
      "pages": [2]
    }
  ]
}

The line that sends it, in three languages

Where to go next

Every JSON key of a request, in one page The other twenty-two things you can draw

See the prices See the examples