Bug 693671

Summary: JS in PDF isn't displayed.
Product: MuPDF Reporter: eezip0
Component: mupdfAssignee: MuPDF bugs <mupdf-bugs>
Status: CONFIRMED ---    
Severity: enhancement CC: eezip0, robin.watts
Priority: P4    
Version: master   
Hardware: PC   
OS: Windows 7   
Customer: Word Size: ---
Attachments: Example PDF with embedded JS.

Description eezip0 2013-02-27 22:23:41 UTC
Created attachment 9331 [details]
Example PDF with embedded JS.

There is a program I use which embeds JS into a PDF to provide information of elements in the PDF in pop ups. JS is also used to navigate by clicking on hierarchical elements in the PDF.

Open the attached PDF in Acrobat Reader. Clicking on the resistor elements brings up a menu, where selecting Attributes invokes a box showing properties for the resistor. Clicking a the 'RES' box also brings up a menu, with Attributes, but also a Descend option to go into this hierarchical box. Once descended, the Previous View command in Acrobat will ascend up one level in the hierarchy.

In any other PDF viewer I've tried, includng MuPDF 1.2, the JS appears to be ignored.
Comment 1 Robin Watts 2013-02-28 00:53:26 UTC
We support JS for form and field validation. We don't currently support arbitrary JS like this. Given that this is the first ever such file I've seen that uses it, and no one other than Adobe Reader uses it, and it's completely against the spirit of PDF, I can't see us rushing to support this in a hurry.
Comment 2 eezip0 2013-02-28 01:43:53 UTC
Hi Robin,

Understood. I'd love to have a solution other than Adobe Reader, but I completely understand this not being a high priority. Or not fitting within the desired goals of MuPDF. Thanks for the update!
Comment 3 Robin Watts 2013-02-28 18:05:29 UTC
Downgrading to an enhancement; after discussion with other developers this is something we could do if required, but it's not a high priority now.