Export to PDF via scripter

Previous topic - Next topic

Sam Nirvana

Hello.

The help system of scribus 1.5.3 is not clear about exporting a document to PDF via python scripter.

Say I have a document opened in scribus named "simpledoc.sla" with 55 pages;
I want to export to PDF pages from 21 to 24 as "fourpages.pdf".

Can you put down a chunk of python code that does what I have just said?

Just one or two lines of python code, not more.

Thanks.

a.l.e

the question has been answered in the mailing list by juraj:

http://lists.scribus.net/pipermail/scribus/2018-January/054841.html

import scribus
pdf = scribus.PDFfile()
pdf.pages = [21, 22, 23, 24]
pdf.file = 'fourpages.pdf'
pdf.save()


@sam / sergio / guests5114: you asked the question on irc, mailing list and in this forum (at least...).
if you get a reply, please consider following up on each channel, telling everybody that you got a reply elsewhere, and link / copy the solution.
(most of the time, it's useful to summarize the solutions you got, even if you're not 100% happy with what you got)