Red Hat Bugzilla – Bug 1284549
Export as PNG does not work
Last modified: 2016-05-06 15:24:27 EDT
Created attachment 1097700 [details]
Patch to resolve the issue
Description of problem:
Saving (exporting) a page (or selection) as PNG fails silently.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a diagram
2. Select Document/Export as PNG, specify a location and press Save
Nothing happens. No file is created, and no error message is displayed. No errors are printed on the console either.
The specified file should be created.
According to https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIWebBrowserPersist, saveURI() expects eight arguments, and adjusting line 264 of /usr/share/pencil/content/pencil/common/svgRasterizer.js accordingly resolves this issue.
(https://code.google.com/p/evoluspencil/issues/detail?id=526#c17 led me on the right path, but it looks like the API and pencil's invocation of it played another round of leapfrog, so I had to adjust the fix by adding yet another 'null' argument. Without proper API versioning, I'm sure this will keep happening, but that's a different matter.)
pencil-2.0.18-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b6e90866ec
pencil-2.0.18-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.