Bug 65778

Summary: Poppler doesn't display multiple-PDFs-inlined
Product: poppler Reporter: Germán Poo-Caamaño <gpoo+bfdo>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
See Also: https://bugzilla.gnome.org/show_bug.cgi?id=585572
Whiteboard:
i915 platform: i915 features:
Attachments: PDF test case with inline pdfs

Description Germán Poo-Caamaño 2013-06-15 07:04:06 UTC
Created attachment 80837 [details]
PDF test case with inline pdfs

As reported in https://bugzilla.gnome.org/show_bug.cgi?id=585572

"I have created a "PDF Package" with Adobe Acrobat on Windows which contains a
PDF. The Acrobat Reader displays the inlined PDF, while Evince only shows a cover
page.

I expected Evince to display the inlined PDF as the Acrobat Reader does."

The problem is reproducible with poppler-glib-demo master (>0.22.4)
Comment 1 Albert Astals Cid 2013-06-15 13:48:55 UTC
Why is this a poppler bug?
Comment 2 Germán Poo-Caamaño 2013-06-15 15:54:28 UTC
The cover says (Google Translate):

"To work with documents in a PDF package is the use of Adobe Reader or Adobe Acrobat version 8 or higher is recommended. The following benefits are available at an update to the latest version available:
[..."

It seems to me this is the PDF equivalent of "<noscript>Your browser does not support JavaScript!</noscript>".  As poppler renders PDF, I think it could be expected to deal with this kind of document.

IIUC, it defines the document as /Subtype application/pdf.  Not having anything else, it might be possible to just show its content.  Please, let me know if I am wrong.
Comment 3 Albert Astals Cid 2013-06-15 17:04:06 UTC
The pdf is attached, you can see okular gives you the attachment, you can save it an open it. Not sure if evince supports showing the attachments. To support what adobe does one could just see if the attachements are pdf files and offer to open them too.

Honestly i don't see what we have to do in poppler.
Comment 4 Germán Poo-Caamaño 2013-06-15 17:10:38 UTC
Evince does the same as okular.  The behaviour expected with packaged pdf is to show the pdf instead of the message (as Acroread does).
Comment 5 Albert Astals Cid 2013-06-15 17:35:33 UTC
Ok, right, the file specifies the "Collection" entry we don't parse, we should parse that and expose it to the viewer.

Patches welcome, should not be very hard :-)
Comment 6 Andrej 2013-07-29 15:53:57 UTC
(In reply to comment #0)
> Created attachment 80837 [details]
PDF test case with inline pdfs

As
> reported in https://bugzilla.gnome.org/show_bug.cgi?id=585572

"I have
> created a "PDF Package" with Adobe Acrobat on Windows which contains a
PDF.
> The Acrobat Reader displays the inlined PDF, while Evince only shows a cover
> page.

I expected Evince to display the inlined PDF as the Acrobat Reader
> does."

The problem is reproducible with poppler-glib-demo master (>0.22.4)

Inside the PDF, there is an automatically created JavaScript code which has syntax errors (double quotes). You can see it in the JS debugger or in the PDF source code (in any text editor)
Comment 7 Andrej 2013-07-30 05:36:08 UTC
Comment on attachment 80837 [details]
PDF test case with inline pdfs

There is a bug in Adobe Acrobat, when the language is set to German: A script code with syntax errors is generated when saving a file with PDF attachments using the 'Reader extended PDF functions' > 'Enable Additional Features'.

The created JavaScript code uses double quotes for text highlighting within the function FileAttachmentsCompatibility.
Comment 8 GitLab Migration User 2018-08-20 22:02:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/166.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.