Export to GitHub

evoluspencil - issue #545

Exporting page to PNG doesn't work


Posted on Feb 20, 2013 by Happy Giraffe

What steps will reproduce the problem? 1. Choose File > Export Page as PNG... 2. Type a file name 3. Save

Expected: The PNG file on the chosen directory.

Actual result: No further dialog. No PNG file found.

I've tested with Debian Wheezy 64-bit and Ubuntu 12.04 LTS 64-bit, with both the extension and Deb version. Pencil 2.0.3.

Comment #1

Posted on Feb 27, 2013 by Helpful Horse

Same problem for me

Comment #2

Posted on Mar 6, 2013 by Happy Panda

Same, Pencil as Extention, version 2.0.3 on a MacOsX, PNG export broken

Comment #3

Posted on Mar 10, 2013 by Grumpy Dog

me too , same problem.

Fedora 17 , version 2.0.4 , xulrunner:Mozilla XULRunner 18.0.2 - 20130206130216 Fedora 18 , version 2.0.4 , xulrunner:Mozilla XULRunner 19.0 -20130218162742

can't export document to png on upon two environment.

A: --> Export Page as PNG --> choose a file --> save --> then nothing changes. B: --> Export Document --> Rasterized graphics (PNG files) --> select any "Pages" to export --> Next --> Browse to select a destination --> finish --> Progress bar doesn't change.

Comment #4

Posted on Mar 11, 2013 by Grumpy Dog

( same problem in issue #526 )

Hello , It seems that i have solved this problem. the reason why can't save the png because the nsIWebBrowserPersist require 7 parameters on some xulrunner.

so,correct it is easy : find 264 line in svgRasterizer.js , change the following line persist.saveURI(uri, null, null, null, null, localFile); to persist.saveURI(uri, null, null, null, null, localFile , null );

restart pencil , it works!

Comment #5

Posted on Mar 11, 2013 by Grumpy Bear

Hello, I edited the file /usr/share/pencil/content/pencil/common/svgRasterizer.js with this path but it don't work :(

[root@ecudesp ~]# cat /usr/share/pencil/content/pencil/common/svgRasterizer.js | grep "persist.saveURI" persist.saveURI(uri, null, null, null, null, localFile, null);

Comment #6

Posted on Mar 11, 2013 by Happy Rabbit

your suggest does not work for me too

Comment #7

Posted on Mar 11, 2013 by Grumpy Dog

have you try to clear up cache like this: /usr/lib/xulrunner/xulrunner --app /usr/share/pencil/application.ini -purgecaches

Comment #8

Posted on Apr 10, 2013 by Grumpy Hippo

Post #4 works for me.

I am still on Ubuntu 10.04 LTS (Pencil 2.0.3)

About the purging of cache, running this: xulrunner --app /usr/share/pencil/application.ini -purgecachesError: Platform version

gives me: '1.9.2.28' is not compatible with minVersion >= 1.9.8 maxVersion <= *

I can get it to start by modifying it to: firefox --app /usr/share/pencil/application.ini -purgecaches

I have Mozilla Firefox 20.0 installed.

Comment #9

Posted on May 7, 2013 by Grumpy Horse

Post #4 works for me too on gentoo. Gentoo use firefox to launch the app (and not xul-runner) but you really need to purge the cache.

On gentoo is: firefox --app /usr/share/evoluspencil/application.ini -purgecaches

Comment #10

Posted on May 8, 2013 by Swift Monkey

The Mozilla docs give this warning about using null1:

Important: If you think that you should be passing null here, you are almost certainly wrong. null should be passed only when no plausible privacy context exists for the URI to be saved, which is an exceedingly rare corner case.

Comment #11

Posted on Jun 13, 2013 by Swift Monkey

Further to my previous comment, I received confirmation that the suggested solution is safe.1

I also located an upstream bug about it.2

Status: New

Labels:
Type-Defect Priority-Medium