[poppler] Clarification request: Several link actions in one position
Leonard Rosenthol
lrosenth at adobe.com
Tue Dec 15 11:47:57 UTC 2020
> To avoid misunderstanding: Do you mean that a reader should process *all* actions (in the order you describe), or just the first one?
>
We should be careful about the terminology here.
The PDF that I saw had multiple *annotations* (a Link and a Widget) that had overlapping rectangles. *for normal processing* - When the user clicks in a certain point, the interactive PDF processor should walk through the array of annotations on the page dictionary and execute any action(s) associated with the first one that it finds that covers the clicked point. If, however, there is no action to be taken, then move on to see if any more annotations are covering the hit point.
Now, beyond that, the processor could do what it wants. For example, support left vs. right clicks. Or support a normal mode and an editing mode. Or ....
Why you folks are thinking about this area - don't forget to support QuadPoints for annotation (esp. Link) boundaries. And there is also a proposal in the works at ISO for non-rectangular links (where an arbitrary path can be provided).
Leonard
Or just the first few ones, stopping where it makes sense (like when
an action triggers going to a different page)?
On 12/15/20, 3:07 AM, "Oliver Sander" <oliver.sander at tu-dresden.de> wrote:
Thank you, Leonard!
To avoid misunderstanding: Do you mean that a reader should process
*all* actions (in the order you describe), or just the first one?
Or just the first few ones, stopping where it makes sense (like when
an action triggers going to a different page)?
I am asking because the second interpretation (just process the
first action) is what triggered the bug report: There, it's the
second action that really matters.
Best regards,
Oliver
On 14.12.20 14:01, Leonard Rosenthol wrote:
> Always happy to help.
>
> The order of the Annotations in the Annots array in the page dictionary defines the order in which rendering and hit testing is performed. However, there is nothing that precludes you doing what you're doing with the multiple click choices as well.
>
> Leonard
>
> On 12/14/20, 2:28 AM, "poppler on behalf of Oliver Sander" <poppler-bounces at lists.freedesktop.org on behalf of oliver.sander at tu-dresden.de> wrote:
>
>
> Dear Leonard,
>
> please allow me to ask about a detail of the PDF spec. In
>
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.kde.org%2Fshow_bug.cgi%3Fid%3D429635&data=04%7C01%7Clrosenth%40adobe.com%7C5f62d976c0e24b387a9208d8a001dbc6%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C637435277147494112%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=fj64FdUtAU6NGI2oTS%2BdXr4KFFS7lVR7UE2%2FEKVy4uk%3D&reserved=0
>
> we have received a pdf document with two link actions in the
> very same position. Unfortunately, the spec doesn't seem
> to say what to do in this case. Treat only the first one?
> Treat them all (somehow)? In this particular case, one of
> the actions is practically empty and could be filtered out,
> but it is easy to imagine files with more than one nontrivial
> link actions in one position. What should a conforming
> reader do?
>
> Thank you for your help!
>
> Best regards,
> Oliver
>
>
More information about the poppler
mailing list