r22339 by gpittman -

scribus-commit scribus-commit at lists.scribus.net
Mon Jan 8 17:20:21 UTC 2018

Author: gpittman
Date: Mon Jan  8 17:20:21 2018
New Revision: 22339

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22339
added some examples to manual entry on PDF export using Scripter


Modified: trunk/Scribus/doc/en/scripterapi-PDFfile.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22339&path=/trunk/Scribus/doc/en/scripterapi-PDFfile.html
--- trunk/Scribus/doc/en/scripterapi-PDFfile.html	(original)
+++ trunk/Scribus/doc/en/scripterapi-PDFfile.html	Mon Jan  8 17:20:21 2018
@@ -10,6 +10,7 @@
 <h2>Python: class PDFfile</h2>
 <p><a name="PDFfile">class <strong>PDFfile</strong></a>(<a href="__builtin__.html#object">object</a>)
+<p>For examples on how to implement these commands in a script, check the <a href="#examples">bottom section</a> of this page.</p>
 <hr />
 <p>Methods defined here:</p>
@@ -289,5 +290,24 @@
 15 = PDF 1.5 (Acrobat 6)</p></dd>
+<h4><a name="examples">Examples of Usage</a></h4>
+<p>The simplest usage of these commands would be the following:</p>
+<pre>pdf = scribus.PDFfile()
+pdf.file = 'MyFile.pdf'
+<p>which would save your file under the name <em>MyFile.pdf</em> to the current working directory. It would probably be better to specify a full pathname for your file to be sure where you have saved it. This sequence of commands would save the file using all of your default settings for PDF export.</p>
+<p>Realistically, there are a number of commands you might want to specify, depending on your project, to ensure certain aspects, for example:</p>
+<pre>pdf = scribus.PDFfile()
+pdf.file = 'MyFile.pdf'
+pdf.quality = 1
+pdf.fontEmbedding = 0
+pdf.version = 13
+pdf.pages = [2, 3, 4, 8]
+<p>This would add specifications for the quality of images, ensure font or subset embedding, PDF 1.3 version, and include only pages 2, 3, 4, and 8 from the document.</p>
+<p>If you wish to save another document in the same script, it would need a new specification, such as:
+<pre>pdf2 = scribus.PDFfile()
+pdf2.file = 'MySecondFile.pdf'</pre>
+<p>and so on.</p>

More information about the scribus-commit mailing list