The shapes a page lays over what it draws
Lay squares, circles, lines and outlines over a page, each with its own colour, border and note.
Summary
Some marks belong over a page rather than in it: the circle around a clause, the line that ties a comment to a figure, the outline drawn around an area of a plan. Reading software shows them over the page, lists them beside it, and can be told to keep them off the paper. Each carries a note that reading software shows when a mouse rests on it.
Technically
Written at the top level of a request, under
"page_review_marks"
page_review_marks writes the /Annots of a page: one entry per page, and inside it the shapes in the order they are written. Six kinds are taken, each naming itself under type: square and circle, inscribed in the rectangle they state; line, between two points; polygon, a closed string of segments; polyline, an open one; and redaction, which states a part of the page that must go. Every shape takes the same six common keys, and the shapes of the last entry given for a page are the ones that page carries.
Request schema
-
page_review_marks— array, optional, empty by default. -
page_review_marks[].page— integer ≥ 1, required. The page the shapes are for. -
page_review_marks[].shapes— array, required. The shapes that page carries, in the order they are written. -
shapes[].type— string, required. One ofsquare,circle,line,polygon,polyline,redaction. -
squareandcircle—llx,lly,urx,ury: numbers, all required, the rectangle the shape is inscribed in.interior— colour, optional, what fills it.effect—plainorcloudy, optional, how the border is drawn. -
line—x1,y1,x2,y2: numbers, all required.endings— object, optional, what each end carries, underfromandto, each one ofnone(nothing drawn, which is what an end left out carries),square,circle,diamond,open_arrow,closed_arrow,butt,reverse_open_arrow,reverse_closed_arroworslash.interior— colour, optional, what fills those endings. -
polygonandpolyline—vertices: array of two-number pairs, required.interior— colour, optional.polygonalso takeseffect,polylinealso takesendings. -
redaction—llx,lly,urx,ury: numbers, all required, the part marked.over— array, optional, the patches inside it, each four corners counterclockwise; absent marks the rectangle itself.fill— colour, optional, what the emptied patch is filled with.overlay_text— string, optional, the words printed where the content was.repeating— boolean, optional, false by default, whether those words are set again and again until the patch is full.aligned— one ofleft(the default),centerandright, where those words sit; read only beside words. -
A redaction states what must go. It does not take it out. What
fill,overlay_textandaligneddescribe is the page as it will be once reading software has applied the mark and written the document out again: until that happens the words are still in the file under the mark, and a search finds them. -
Common to every shape:
contents— string, optional, the note reading software shows.name— string, optional, what the shape is known by.color— colour, optional, the border's own.border— object, optional,widthin points and an optionaldash.layer— string, optional, the declared layer the shape is drawn on. -
shapes[].flags— object, optional.printed— boolean, whether the shape goes on paper.hidden,no_view,no_zoom,no_rotate,invisible,read_only— booleans, false by default.
A shape is laid over the page, not into what the page draws: it is kept out of the text a reader copies, and out of the structure a document states about itself.
A whole request that creates a PDF
{
"page_review_marks": [
{
"page": 1,
"shapes": [
{
"type": "square",
"llx": 60,
"lly": 640,
"urx": 300,
"ury": 700,
"color": [0.8, 0.1, 0.1],
"border": { "width": 2 },
"effect": { "cloudy": { "intensity": 1.5 } },
"contents": "The clause under discussion",
"flags": { "printed": false }
},
{
"type": "line",
"x1": 320,
"y1": 700,
"x2": 520,
"y2": 660,
"endings": { "from": "circle", "to": "open_arrow" },
"color": [0.8, 0.1, 0.1],
"border": { "width": 1.5 },
"contents": "Where the clause is answered"
}
]
}
],
"standard_fonts": [{ "name": "sans", "face": "helvetica" }],
"items": [
{
"type": "text",
"rect": { "llx": 60, "lly": 740, "urx": 535, "ury": 765 },
"content": ["A square laid over the clause, and kept off the paper"],
"font": "sans",
"font_size": 14
}
]
}
The sheet, and what is laid under it
The size of the pages A size of its own for certain pages The unit a page is measured in The areas a page states Which way up a page is shown How a page arrives, and how long it stands How far a supplied PDF is allowed to unpack The template under the pages
Where to go next
Every JSON key of a request, in one page The other forty-one settings of a request