Previously removed in commit b1e1442 and originally discussed in the now-closed issue #9.
Context
A PDF annotation is represented by either:
- a page number associated with an array of quadpoints describing one or more highlighted areas on that page
- an array of objects, each containing a page number and its corresponding quadpoints array, allowing a single annotation to span multiple pages.
At the moment, there is no selector capable of representing this PDF-specific selection.
References:
A previous proposal suggested using a FragmentSelector based on the PDF Media Types specification (RFC 8118): https://www.rfc-editor.org/info/rfc8118/
The specification defines fragment identifiers such as:
page=<pageNum>
to identify a physical page (starting at page 1), and:
viewrect=<left>,<top>,<width>,<height>
to define a rectangular viewing region.
While this approach is suitable for navigating to a page or a single rectangular region, it cannot accurately represent the geometry of a text selection or highlight composed of multiple rectangles. A single annotation frequently spans several text lines, each represented by its own quadrilateral, making the RFC 8118 fragment syntax insufficient for this use case.
Quadpoints provide a more expressive representation. They can be defined either as:
- an array of four coordinate tuples describing the four vertices of a quadrilateral in page coordinates (origin at the bottom-left of the page, consistent with the PDF coordinate system), enabling arbitrary polygonal selections; or
- an array of two coordinate tuples defining the opposite corners of an axis-aligned rectangle.
Supporting quadpoints as a dedicated selector would preserve the complete geometry of PDF annotations, including multi-line highlights and other non-rectangular selections, which cannot be faithfully represented using the existing PDF fragment identifier syntax.
Official def:
An array of 8 × n numbers specifying the coordinates of n quadri-
laterals in default user space. Each quadrilateral encompasses a word or
group of contiguous words in the text underlying the annotation. The coor-
dinates for each quadrilateral are given in the order
x1 y1 x2 y2 x3 y3 x4 y4
specifying the quadrilateral’s four vertices in counterclockwise order (see
Figure 7.5). The text is oriented with respect to the edge connecting points
(x1, y1) and (x2, y2). (See implementation note 59 in Appendix H.
Previously removed in commit b1e1442 and originally discussed in the now-closed issue #9.
Context
A PDF annotation is represented by either:
At the moment, there is no selector capable of representing this PDF-specific selection.
References:
A previous proposal suggested using a FragmentSelector based on the PDF Media Types specification (RFC 8118): https://www.rfc-editor.org/info/rfc8118/
The specification defines fragment identifiers such as:
to identify a physical page (starting at page 1), and:
to define a rectangular viewing region.
While this approach is suitable for navigating to a page or a single rectangular region, it cannot accurately represent the geometry of a text selection or highlight composed of multiple rectangles. A single annotation frequently spans several text lines, each represented by its own quadrilateral, making the RFC 8118 fragment syntax insufficient for this use case.
Quadpoints provide a more expressive representation. They can be defined either as:
Supporting quadpoints as a dedicated selector would preserve the complete geometry of PDF annotations, including multi-line highlights and other non-rectangular selections, which cannot be faithfully represented using the existing PDF fragment identifier syntax.
Official def: