Bug 1284549

Summary: Export as PNG does not work
Product: [Fedora] Fedora Reporter: Alex Nordstrom <alex>
Component: pencilAssignee: Truong Anh Tuan <tuanta>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: bochecha, mrunge, tuanta
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: pencil-2.0.18-1.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-06 19:24:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1327652    
Bug Blocks:    
Attachments:
Description Flags
Patch to resolve the issue none

Description Alex Nordstrom 2015-11-23 14:59:52 UTC
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):
pencil-2.0.5-3.fc23.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create a diagram
2. Select Document/Export as PNG, specify a location and press Save

Actual results:
Nothing happens. No file is created, and no error message is displayed. No errors are printed on the console either.

Expected results:
The specified file should be created.

Additional info:
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.)

Comment 1 Fedora Update System 2016-05-04 07:41:49 UTC
pencil-2.0.18-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b6e90866ec

Comment 2 Fedora Update System 2016-05-06 19:24:20 UTC
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.