Comment 18 for bug 125498

Revision history for this message
In , Eugen Dedu (eugen-dedu) wrote :

Hi,

In the two documents attached, there is an index/outline item which has no destination.

From pdf reference v.1.7 (http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference.pdf), section 8.2.2, page 586, the destination (the actions too) is optional for outline items and annotations, but required for actions and remote actions, so no warning should be displayed for outline items (such as the two documents attached).

So poppler should return no action when the dest/action is optional and is not present in the pdf file, but POPPLER_ACTION_NONE (for ex.) does not exist.

(By the way, I notice that PopplerDestType is not used, the destinations being considered as actions. For ex., a "grep -r PopplerDestType ." shows no usage of this type. Also, poppler/Outline.cc:78:
     78 if (!dict->lookup("Dest", &obj1)->isNull()) {
     79 action = LinkAction::parseDest(&obj1);
     80 } else {
     81 obj1.free();
     82 if (!dict->lookup("A", &obj1)->isNull()) {
     83 action = LinkAction::parseAction(&obj1);
     84 }
shows that destinations and actions are treated in the same manner, as actions.)

Therefore, I propose the attached patch in my previous comment. I do not know well the poppler application, so please check if I modified all the needed files.

Cheers,
Eugen Dedu