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.
See It in a Real PDF
What a document says about itself — DRAFT, COPY, PAID — laid across rectangles of four different shapes and scaled to each, then SPECIMEN given to the document once and laid on every even page.
Open the PDF The Whole Example
Also shown in: An Agreement Built on Three Supplied Templates · A Snag List, with Every Defect Marked on the Plan · A Register Whose Pages Say Where They Came From
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. Thirteen 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; redaction, which states a part of the page that must go; text_mark, which lays a highlight, an underline, a strike-out or a squiggle on a passage of text; caret, which marks where something is to be inserted; ink, a scribble drawn freehand; sticky_note, an icon whose words reading software opens beside it; file_attachment, an icon that opens a file the document carries; free_text, words laid in a box of their own; and stamp, a rubber stamp pressed over its box. 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,text_mark,caret,ink,sticky_note,file_attachment,free_text,stamp. -
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. -
text_mark—style: one ofhighlight,underline,strike_outandsquiggly, required.over— array, required, the passage: one patch per line it runs across, each four corners counterclockwise; an empty one is refused. Ahighlightis painted in itscolor, which it must state, multiplied with the page so the letters under it stay legible; the other three are stroked in theirs, black where they state none. -
caret—llx,lly,urx,ury: numbers, all required, the box the caret stands in, filled in itscolor.inset— four numbers, optional, how far it is drawn in from the left, bottom, right and top edges.paragraph— boolean, optional, false by default, whether the insertion is a new paragraph. -
ink—strokes: array, required, the strokes of a scribble drawn freehand, each an array of two-number points in the order the pen went through them, at least two to a stroke. -
sticky_note—x,y: numbers, required, the lower-left corner of its icon, twenty points on a side.icon— one ofnote(the default),comment,key,help,new_paragraph,paragraphandinsert.open— boolean, optional, false by default, whether its words show open when the document is opened. Itscontentsare required: they are the words it opens on. -
file_attachment—x,y: numbers, required, the lower-left corner of its icon, twenty points on a side.file— string, required, the name of one of the request'sattachments, which the icon opens.icon— one ofpush_pin(the default),graph,paperclipandtag. -
free_text—llx,lly,urx,ury: numbers, all required, the box.text— string, required, the words laid in it, which are also itscontentsunless it states other ones; a box that does not hold every line of them is refused.style— object, required, how they are set: thefont,font_size,color,alignand indents of a flowed text item, its colour given in numbers.callout— object, optional, the line pointing the box at a spot of the page:line, two or three points, the spot first, andending, one of a line's endings, drawn at the spot.typewriter— boolean, optional, false by default, whether the words are typed straight onto the page, with no frame; never besidecallout. -
stamp—llx,lly,urx,ury: numbers, all required, the box it claims.words— object, optional, the line pressed across the box: thecontent,font,span,slant,colorandshadowof a stamp item; absent shows the frame of the box.icon— optional, which of the standard's stamps it stands for:approved,experimental,not_approved,as_is,expired,not_for_public_release,confidential,final,sold,departmental,for_comment,top_secret,draftorfor_public_release. -
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. -
shapes[].appearance— array, optional. The shapes the mark is drawn with, in place of the ones built from what it states: the articles a named drawing holds —path,rect,line— in the page's own coordinates. Nothing is checked against what the mark states. They hold no text and paint in colours given in numbers: a gradient, a repeating cell, a declared colour space or a graphics state is refused. -
overlay— array, optional, on aredaction. The shapes the emptied patch is drawn with once the mark is applied: the same articles under the same rule, measured from the lower-left corner of its rectangle rather than from the page's. -
shapes[].flagsalso takeslocked, which bars moving, resizing and deleting the mark while leaving its note free to change;locked_contents, which bars changing its note while leaving it free to move; andtoggle_no_view, which turnsno_viewaround while the pointer is over the mark or while it is selected. All three are booleans,falseby default. -
A sticky note's
iconalso takescross_hairs,right_arrow,right_pointer,up_arrowandup_left_arrow. A note setting astate—markedorunmarked, oraccepted,rejected,cancelledorcompleted— sets the shape itsin_reply_tonames to that state. Every shape also takesrich_contents, its words as the body of an XHTML document;opacity, from 0 to 1;grouped_with, thenameof the shape heading the group it joins; andpopup,{"llx", "lly", "urx", "ury", "open"}, the window reading software shows its words in.
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
{
"attachments": [
{
"name": "statement_4711",
"file_name": "statement-4711.xml",
"description": "The statement as a data file",
"media_type": "text/xml",
"relationship": "data",
"modified": "2026-08-03T09:15:00+02:00"
}
],
"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"
},
{
"type": "text_mark",
"style": "highlight",
"over": [[[60, 600], [240, 600], [240, 614], [60, 614]]],
"color": [1.0, 0.85, 0.2],
"contents": "The passage under discussion"
},
{
"type": "text_mark",
"style": "underline",
"over": [[[60, 580], [240, 580], [240, 594], [60, 594]]],
"color": [0.75, 0.1, 0.1]
},
{
"type": "text_mark",
"style": "strike_out",
"over": [[[60, 560], [240, 560], [240, 574], [60, 574]]],
"color": [0.75, 0.1, 0.1]
},
{
"type": "text_mark",
"style": "squiggly",
"over": [[[60, 540], [240, 540], [240, 554], [60, 554]]],
"color": [0.75, 0.1, 0.1]
},
{
"type": "sticky_note",
"x": 250,
"y": 596,
"icon": "comment",
"color": [1.0, 0.85, 0.2],
"contents": "Check this passage against the signed copy"
},
{
"type": "file_attachment",
"x": 520,
"y": 596,
"file": "statement_4711",
"icon": "paperclip"
},
{
"type": "free_text",
"llx": 300,
"lly": 540,
"urx": 535,
"ury": 560,
"text": "Totals to check against the delivery note",
"style": {
"font": "sans",
"font_size": 9,
"color": [0.75, 0.1, 0.1],
"left_indent": 4,
"right_indent": 4
},
"color": [0.75, 0.1, 0.1],
"callout": {
"line": [[245, 567], [270, 550], [300, 550]],
"ending": "open_arrow"
}
},
{
"type": "stamp",
"llx": 300,
"lly": 640,
"urx": 500,
"ury": 696,
"icon": "approved",
"words": {
"content": "APPROVED",
"font": "sans",
"slant": "flat",
"color": [0.1, 0.5, 0.2]
},
"contents": "Approved by the purchasing department"
}
]
}
],
"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 Where a Page's Sheet Sits in the Drawing The Areas a Page States Which Way up a Page Is Shown How a Page Arrives, and How Long It Stands A PDF You Send, as the Pages Themselves How Far a Supplied PDF Is Allowed to Unpack The Template under the Pages A Watermark Laid across a Run of Pages Named Regions a Page Marks for Filling
Where to Go Next
Every JSON key of a request, in one page The other forty-one settings of a request