pdf-issues icon indicating copy to clipboard operation
pdf-issues copied to clipboard

Add document level & page level annotations

Open lrosenthol opened this issue 8 months ago • 7 comments

Currently all annotations are tied to a specific bounding area of a specific page - this precludes the ability to have an annotation that is connected to a page w/o a specific area of the page, or the entire document.

Recommend that we extend the existing annotation data structures (and potentially processor requirements) to provide for this.

lrosenthol avatar Apr 30 '25 19:04 lrosenthol

Another possible thing is "shared annotations", where it's visible from two or more pages but maybe with different offsets from page origin.

crlf0710 avatar May 24 '25 02:05 crlf0710

What is the use case, @crlf0710?

On Fri, May 23, 2025 at 10:59 PM Charles Lew @.***> wrote:

crlf0710 left a comment (pdf-association/pdf-issues#547) https://github.com/pdf-association/pdf-issues/issues/547#issuecomment-2906330667

Another possible thing is "shared annotations", where it's visible from two or more pages but maybe with different offsets from page origin.

— Reply to this email directly, view it on GitHub https://github.com/pdf-association/pdf-issues/issues/547#issuecomment-2906330667, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGW6NKPIL3BWSJYR3YI6ZD277OB3AVCNFSM6AAAAAB4GPH2FCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMBWGMZTANRWG4 . You are receiving this because you authored the thread.Message ID: @.***>

lrosenthol avatar May 25 '25 12:05 lrosenthol

Another possible thing is "shared annotations", where it's visible from two or more pages but maybe with different offsets from page origin.

That an annotation may be referenced from only one page is an important property some PDF processors both rely upon, and strive to maintain (for example, when duplicating pages). It should be possible, and would be best, to implement this feature request without breaking that property.

johnwhitington avatar May 26 '25 11:05 johnwhitington

What is the use case, @crlf0710?

I had the "paging seals" example on my mind when i mentioned this, but this might not appear motivative enough.

Image

Just thinking if an annotation is not tied to any page but to the document level, i think it (and its appearance) might be considered shared between all pages (the whole page tree) of the document.

It should be possible, and would be best, to implement this feature request without breaking that property.

Yes, for instance just assigning the shared annotation an "owning page" and make other pages the "observing pages" will make things backward compatible.

crlf0710 avatar May 27 '25 08:05 crlf0710

If some entity has visualizations on multiple pages, one could model that in a way similar to how it's done for form fields where you have form field objects which references a collection of widget annotations, the individual visualization annotations of the form field.

mkl-public avatar May 28 '25 10:05 mkl-public

In my thinking, these new types of annotations do not have any appearances - because they don't exist in coordinate space.

lrosenthol avatar May 28 '25 21:05 lrosenthol

Just out of curiosity, if they don't have any appearances, what's the difference between them and, say, DocPart or XMP Metadata?

crlf0710 avatar May 29 '25 04:05 crlf0710