[scribus] a new script for exporting pages using ImageExport()

Gregory Pittman gpittman at iglou.com
Wed Oct 5 23:29:35 UTC 2016


On 10/05/2016 02:39 PM, ZASKE Martin wrote:
> Thank you a.l.e for your quick response.
> 
> Are you indirectly saying that class ImageExport(object) does no longer
> exist in the (Scribus 1.5.2 64bit for Windows) Python API?
> 
> We are just trying to have a tiny script for doing what the Scribus Menu
> 
> File > Export > Save as Image ... >
> 
> does.
> 
> 
> So far we are doing it manually from the Scribus menus (clicking with
> the mouse) and the results are excellent; we do not need better results.
> We just need less clicking and less mistakes (typos).
> 
> 
> 
> 
> 
> If ImageExport() does not exist any longer, it might need removing from
> the help.
> 
> If it still does exist, maybe some other user can share how to access
> ImageExport().
> 
> The point is to make things easier for my team, not to add another step
> and create PDFs. If somebody can tell me how to make a script for
> exporting PDFs (which is in the same menu, right next to exporting
> images) then maybe I can "guess" how to export bitmaps.
> 

>From what I can see, there is pretty minimal explanation for
ImageExport. It would take a while to see if is viable. A starting place
might be a see if I can find it in the Scripter code.

Another option to consider would be exporting a document as single page
PDFs, which is quite easy from the menu. You could then change these
with some batch processing via ImageMagick to whatever file format you
like. The resolution of the PDFs is so much better than a PNG, and from
what I can see the export to PDFs is much faster too.

For example, using the mogrify command from ImageMagick:

mogrify -format png YourDoc*.pdf

Note that the type after the -format option is what you are transforming
to. Also, this is nondestructive, so the original PDFs are still there.
They would be named something like YourDoc-Page001.pdf, and so on.

Add a -resize option if needed.

This is SO MUCH easier than working with Scripter.

Greg



More information about the scribus mailing list