r19746 by jghali - several changes to scripter PDF export: possibility to set mark length, make unit handling consistent with bleed values
scribus-commit
scribus-commit at lists.scribus.net
Sat Jan 10 11:05:54 UTC 2015
Author: jghali
Date: Sat Jan 10 11:05:54 2015
New Revision: 19746
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19746
Log:
several changes to scripter PDF export: possibility to set mark length, make unit handling consistent with bleed values
Modified:
trunk/Scribus/doc/de/scripterapi-PDFfile.html
trunk/Scribus/doc/en/scripterapi-PDFfile.html
trunk/Scribus/doc/fr/scripterapi-PDFfile.html
trunk/Scribus/doc/it/scripterapi-PDFfile.html
trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
Modified: trunk/Scribus/doc/de/scripterapi-PDFfile.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19746&path=/trunk/Scribus/doc/de/scripterapi-PDFfile.html
==============================================================================
--- trunk/Scribus/doc/de/scripterapi-PDFfile.html (original)
+++ trunk/Scribus/doc/de/scripterapi-PDFfile.html Sat Jan 10 11:05:54 2015
@@ -13,9 +13,11 @@
<dt><a name="PDFfile-Save"><strong>Save</strong></a>(...)</dt>
<dd><code>This method is deprecated - use <a href="#PDFfile-save">save</a>() instead.</code></dd>
- <dt><a name="PDFfile-__init__"><strong>__init__</strong></a>(...)</dt><dd><code>x.<a href="#PDFfile-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</code></dd>
-
- <dt><a name="PDFfile-save"><strong>save</strong></a>(...)</dt><dd><code>Save selected pages to pdf file</code></dd>
+ <dt><a name="PDFfile-__init__"><strong>__init__</strong></a>(...)</dt>
+ <dd><code>x.<a href="#PDFfile-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</code></dd>
+
+ <dt><a name="PDFfile-save"><strong>save</strong></a>(...)</dt>
+ <dd><code>Save selected pages to pdf file</code></dd>
</dl>
<hr>
@@ -44,6 +46,9 @@
0 - Left binding<br>
1 - Right binding</code></dd>
+ <dt><strong>bleedMarks</strong> = <attribute 'bleedMarks' of 'PDFfile' objects></dt>
+ <dd><code>Create marks delimiting the bleed area.</code></dd>
+
<dt><strong>bleedb</strong> = <member 'bleedb' of 'PDFfile' objects></dt>
<dd><code>Bleed Bottom<br>Distance for bleed from the bottom of the physical page</code></dd>
@@ -59,6 +64,9 @@
<dt><strong>bookmarks</strong> = <member 'bookmarks' of 'PDFfile' objects></dt>
<dd><code>Embed the bookmarks you created in your document.<br>These are useful for navigating long PDF documents.<br>Bool value</code></dd>
+ <dt><strong>colorMarks</strong> = <member 'colorMarks' of 'PDFfile' objects></dt>
+ <dd><code>Add color calibration bars.</code></dd>
+
<dt><strong>compress</strong> = <member 'compress' of 'PDFfile' objects></dt>
<dd><code>Compression switch. Bool value.</code></dd>
@@ -69,6 +77,27 @@
2 - zip<br>
3 - None.</code></dd>
+ <dt><strong>cropMarks</strong> = <attribute 'cropMarks' of 'PDFfile' objects></dt>
+ <dd><code>Create crop marks in the PDF indicating where the paper should be cut or trimmed after printing.</code></dd>
+
+ <dt><strong>displayBookmarks</strong> = <attribute 'displayBookmarks' of 'PDFfile' objects></dt>
+ <dd><code>Display the bookmarks upon opening.</code></dd>
+
+ <dt><strong>displayFullscreen</strong> = <attribute 'displayFullscreen' of 'PDFfile' objects></dt>
+ <dd><code>Display the document in full screen mode upon opening.</code></dd>
+
+ <dt><strong>displayLayers</strong> = <attribute 'displayLayers' of 'PDFfile' objects></dt>
+ <dd><code>Display the layer list upon opening. Useful only for PDF 1.5+.</code></dd>
+
+ <dt><strong>displayThumbs</strong> = <attribute 'displayThumbs' of 'PDFfile' objects></dt>
+ <dd><code>Display the page thumbnails upon opening.</code></dd>
+
+ <dt><strong>docInfoMarks</strong> = <member 'docInfoMarks' of 'PDFfile' objects></dt>
+ <dd><code>Add document information which includes the document title and page numbers.</code></dd>
+
+ <dt><strong>doClip</strong> = <attribute 'doClip' of 'PDFfile' objects></dt>
+ <dd><code>Do not show objects outside the margins in the exported file.</code></dd>
+
<dt><strong>downsample</strong> = <attribute 'downsample' of 'PDFfile' objects></dt>
<dd><code>Downsample image resolusion to this value. Values from 35 to 4000<br>Set 0 for not to downsample</code></dd>
@@ -102,14 +131,28 @@
4 - Top-left to Bottom-Right
</pre></code></dd>
+<dt><strong>embedPDF</strong> = <member 'embedPDF' of 'PDFfile' objects></dt>
+<dd><code>Export PDFs in image frames as embedded PDFs.<br>
+This does *not* yet take care of colorspaces, so you should know what you are doing before setting this to 'true'.<br>
+Bool value.</code></dd>
+
<dt><strong>encrypt</strong> = <member 'encrypt' of 'PDFfile' objects></dt>
<dd><code>Use Encription. Bool value</code></dd>
<dt><strong>file</strong> = <attribute 'file' of 'PDFfile' objects></dt>
<dd><code>Name of file to save into</code></dd>
+<dt><strong>fitWindow</strong> = <attribute 'fitWindow' of 'PDFfile' objects></dt>
+<dd><code>Fit the document page or pages to the available space in the viewer window.</code></dd>
+
<dt><strong>fonts</strong> = <attribute 'fonts' of 'PDFfile' objects></dt>
<dd><code>List of fonts to embed.</code></dd>
+
+<dt><strong>hideMenuBar</strong> = <attribute 'hideMenuBar' of 'PDFfile' objects></dt>
+<dd><code>Hides the viewer menu bar, the PDF will display in a plain window.</code></dd>
+
+<dt><strong>hideToolBar</strong> = <attribute 'hideToolBar' of 'PDFfile' objects></dt>
+<dd><code>Hides the viewer toolbar. The toolbar has usually selection and other editing capabilities.</code></dd>
<dt><strong>imagepr</strong> = <attribute 'imagepr' of 'PDFfile' objects></dt>
<dd><code>Color profile for images</code></dd>
@@ -130,6 +173,9 @@
1 - Relative Colorimetric<br>
2 - Saturation<br>
3 - Absolute Colorimetric</code></dd>
+
+<dt><strong>isGrayscale</strong> = <attribute 'isGrayscale' of 'PDFfile' objects></dt>
+<dd><code>Export PDF in grayscale.</code></dd>
<dt><strong>lpival</strong> = <attribute 'lpival' of 'PDFfile' objects></dt>
<dd><code>Rendering Settings for individual colors.<br>
@@ -147,6 +193,18 @@
</pre>
Be careful when supplying these values as they are not checked for validity.</code></dd>
+<dt><strong>markOffset</strong> = <member 'markOffset' of 'PDFfile' objects></dt>
+<dd><code>Indicate the distance offset between mark and page area.</code></dd>
+
+<dt><strong>markLength</strong> = <member 'markLength' of 'PDFfile' objects></dt>
+<dd><code>Indicate the length of crop and bleed marks.</code></dd>
+
+<dt><strong>mirrorH</strong> = <member 'mirrorH' of 'PDFfile' objects></dt>
+<dd><code>Mirror Page(s) horizontally. Bool value.</code></dd>
+
+<dt><strong>mirrorV</strong> = <member 'mirrorV' of 'PDFfile' objects></dt>
+<dd><code>Mirror Page(s) vertically. Bool value.</code></dd>
+
<dt><strong>noembicc</strong> = <member 'noembicc' of 'PDFfile' objects></dt>
<dd><code>Don't use embedded ICC profiles. Bool value</code></dd>
@@ -157,6 +215,13 @@
<dt><strong>owner</strong> = <attribute 'owner' of 'PDFfile' objects></dt>
<dd><code>Owner's password</code></dd>
+
+<dt><strong>pageLayout</strong> = <attribute 'pageLayout' of 'PDFfile' objects></dt>
+<dd><code>Document layout in PDF viewer:<br>
+0 - Show the document in single page mode<br>
+1 - Show the document in single page mode with the pages displayed continuously end to end like a scroll<br>
+2 - Show the document with facing pages, starting with the first page displayed on the left<br>
+3 - Show the document with facing pages, starting with the first page displayed on the right</code></dd>
<dt><strong>pages</strong> = <attribute 'pages' of 'PDFfile' objects></dt>
<dd><code>List of pages to print</code></dd>
@@ -181,6 +246,9 @@
3 - Low<br>
4 - Minimum</code></dd>
+<dt><strong>registrationMarks</strong> = <attribute 'registrationMarks' of 'PDFfile' objects></dt>
+<dd><code>Add registration marks to each separation.</code></dd>
+
<dt><strong>resolution</strong> = <attribute 'resolution' of 'PDFfile' objects></dt>
<dd><code>Resolution of output file. Values from 35 to 4000.</code></dd>
@@ -189,6 +257,12 @@
<dt><strong>thumbnails</strong> = <member 'thumbnails' of 'PDFfile' objects></dt>
<dd><code>Generate thumbnails. Bool value.</code></dd>
+
+<dt><strong>usedocbleeds</strong> = <attribute 'usedocbleeds' of 'PDFfile' objects></dt>
+<dd><code>Use the existing bleed settings from the document preferences. Bool value.</code></dd>
+
+<dt><strong>useLayers</strong> = <attribute 'useLayers' of 'PDFfile' objects></dt>
+<dd><code>Layers in your document are exported to the PDF. Only available with PDF >= 1.5.</code></dd>
<dt><strong>uselpi</strong> = <member 'uselpi' of 'PDFfile' objects></dt>
<dd><code>Use Custom Rendering Settings. Bool value</code></dd>
@@ -206,4 +280,4 @@
</dl>
</body>
-</html>
+</html>
Modified: trunk/Scribus/doc/en/scripterapi-PDFfile.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19746&path=/trunk/Scribus/doc/en/scripterapi-PDFfile.html
==============================================================================
--- trunk/Scribus/doc/en/scripterapi-PDFfile.html (original)
+++ trunk/Scribus/doc/en/scripterapi-PDFfile.html Sat Jan 10 11:05:54 2015
@@ -200,6 +200,9 @@
<dt><strong>markOffset</strong> = <member 'markOffset' of 'PDFfile' objects></dt>
<dd><p>Indicate the distance offset between mark and page area.</p></dd>
+<dt><strong>markLength</strong> = <member 'markLength' of 'PDFfile' objects></dt>
+<dd><p>Indicate the length of crop and bleed marks.</p></dd>
+
<dt><strong>mirrorH</strong> = <member 'mirrorH' of 'PDFfile' objects></dt>
<dd><p>Mirror Page(s) horizontally. Bool value.</p></dd>
@@ -278,6 +281,7 @@
13 = PDF 1.3 (Acrobat 4)<br>
14 = PDF 1.4 (Acrobat 5)<br>
15 = PDF 1.5 (Acrobat 6)</p></dd>
+
</dl>
</body>
</html>
Modified: trunk/Scribus/doc/fr/scripterapi-PDFfile.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19746&path=/trunk/Scribus/doc/fr/scripterapi-PDFfile.html
==============================================================================
--- trunk/Scribus/doc/fr/scripterapi-PDFfile.html (original)
+++ trunk/Scribus/doc/fr/scripterapi-PDFfile.html Sat Jan 10 11:05:54 2015
@@ -198,6 +198,9 @@
<dt><strong>markOffset</strong> = <attribut 'markOffset' de la classe 'PDFfile'></dt>
<dd><code>Indique la distance entre les repères et la zone de page correspondante.</code></dd>
+<dt><strong>markLength</strong> = <attribut 'markLength' de la classe 'PDFfile'></dt>
+<dd><code>Indique la longueur des repères de coupe et de fonds perdus.</code></dd>
+
<dt><strong>mirrorH</strong> = <attribut 'mirrorH' de la classe 'PDFfile'></dt>
<dd><code>Effectue un miroir horizontal des pages. Valeur booléenne.</code></dd>
Modified: trunk/Scribus/doc/it/scripterapi-PDFfile.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19746&path=/trunk/Scribus/doc/it/scripterapi-PDFfile.html
==============================================================================
--- trunk/Scribus/doc/it/scripterapi-PDFfile.html (original)
+++ trunk/Scribus/doc/it/scripterapi-PDFfile.html Sat Jan 10 11:05:54 2015
@@ -1,211 +1,283 @@
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <title>Python: class PDFfile</title>
-</head>
-<body>
-<h2>Python: class PDFfile</h2>
-<p><a name="PDFfile">class <strong>PDFfile</strong></a>(<a href="__builtin__.html#object">object</a>)
-</p>
-<hr />
-<p>Methods defined here:</p>
-<dl>
- <dt><a name="PDFfile-Save"><strong>Save</strong></a>(...)</dt>
- <dd><code>This method is deprecated - use <a href="#PDFfile-save">save</a>() instead.</code></dd>
-
- <dt><a name="PDFfile-__init__"><strong>__init__</strong></a>(...)</dt>
- <dd><code>x.<a href="#PDFfile-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</code></dd>
-
- <dt><a name="PDFfile-save"><strong>save</strong></a>(...)</dt>
- <dd><code>Save selected pages to pdf file</code></dd>
-</dl>
-
-<hr>
-<p>Data and other attributes defined here:</p>
-<dl>
- <dt><strong>__new__</strong> = <built-in method __new__ of type object></dt>
- <dd><code>T.<a href="#PDFfile-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</code></dd>
-
- <dt><strong>aanot</strong> = <member 'aanot' of 'PDFfile' objects></dt>
- <dd><code>Allow Adding Annotations and Fields. Bool value</code></dd>
-
- <dt><strong>achange</strong> = <member 'achange' of 'PDFfile' objects></dt>
- <dd><code>Allow Changing the Document. Bool value</code></dd>
-
- <dt><strong>acopy</strong> = <member 'acopy' of 'PDFfile' objects></dt>
- <dd><code>Allow Copying Text and Graphics. Bool value</code></dd>
-
- <dt><strong>aprint</strong> = <member 'aprint' of 'PDFfile' objects></dt>
- <dd><code>Allow Printing the Document. Bool value</code></dd>
-
- <dt><strong>article</strong> = <member 'article' of 'PDFfile' objects></dt>
- <dd><code>Save Linked Text Frames as PDF Articles<br> Bool value</code></dd>
-
- <dt><strong>binding</strong> = <member 'binding' of 'PDFfile' objects></dt>
- <dd><code>Choose binding.<br>
- 0 - Left binding<br>
- 1 - Right binding</code></dd>
-
- <dt><strong>bleedb</strong> = <member 'bleedb' of 'PDFfile' objects></dt>
- <dd><code>Bleed Bottom<br>Distance for bleed from the bottom of the physical page</code></dd>
-
- <dt><strong>bleedl</strong> = <member 'bleedl' of 'PDFfile' objects></dt>
- <dd><code>Bleed Left<br>Distance for bleed from the left of the physical page</code></dd>
-
- <dt><strong>bleedr</strong> = <member 'bleedr' of 'PDFfile' objects></dt>
- <dd><code>Bleed Right<br>Distance for bleed from the right of the physical page</code></dd>
-
- <dt><strong>bleedt</strong> = <member 'bleedt' of 'PDFfile' objects></dt>
- <dd><code>Bleed Top<br>Distance for bleed from the top of the physical page</code></dd>
-
- <dt><strong>bookmarks</strong> = <member 'bookmarks' of 'PDFfile' objects></dt>
- <dd><code>Embed the bookmarks you created in your document.<br>These are useful for navigating long PDF documents.<br>Bool value</code></dd>
-
- <dt><strong>compress</strong> = <member 'compress' of 'PDFfile' objects></dt>
- <dd><code>Compression switch. Bool value.</code></dd>
-
- <dt><strong>compressmtd</strong> = <member 'compressmtd' of 'PDFfile' objects></dt>
- <dd><code>Compression method.<br>
- 0 - Automatic<br>
- 1 - JPEG<br>
- 2 - zip<br>
- 3 - None.</code></dd>
-
- <dt><strong>downsample</strong> = <attribute 'downsample' of 'PDFfile' objects></dt>
- <dd><code>Downsample image resolusion to this value. Values from 35 to 4000<br>Set 0 for not to downsample</code></dd>
-
- <dt><strong>effval</strong> = <attribute 'effval' of 'PDFfile' objects></dt>
- <dd><code>List of effection values for each saved page.<br>
- <pre>
-It is list of list of six integers. Those int have the following meaning:
- - Length of time the page is shown before the presentation
- starts on the selected page. (1-3600)
- - Length of time the effect runs. (1 - 3600)
- A shorter time will speed up the effect, a longer one will slow it down
- - Type of the display effect
- 0 - No Effect
- 1 - Blinds
- 2 - Box
- 3 - Dissolve
- 4 - Glitter
- 5 - Split
- 6 - Wipe
- - Direction of the effect of moving lines for the split and blind effects.
- 0 - Horizontal
- 1 - Vertical
- - Starting position for the box and split effects.
- 0 - Inside
- 1 - Outside
- - Direction of the glitter or wipe effects.
- 0 - Left to Right
- 1 - Top to Bottom
- 2 - Bottom to Top
- 3 - Right to Left
- 4 - Top-left to Bottom-Right
-</pre></code></dd>
-
-<dt><strong>encrypt</strong> = <member 'encrypt' of 'PDFfile' objects></dt>
-<dd><code>Use Encription. Bool value</code></dd>
-
-<dt><strong>file</strong> = <attribute 'file' of 'PDFfile' objects></dt>
-<dd><code>Name of file to save into</code></dd>
-
-<dt><strong>fonts</strong> = <attribute 'fonts' of 'PDFfile' objects></dt>
-<dd><code>List of fonts to embed.</code></dd>
-
-<dt><strong>imagepr</strong> = <attribute 'imagepr' of 'PDFfile' objects></dt>
-<dd><code>Color profile for images</code></dd>
-
-<dt><strong>info</strong> = <attribute 'info' of 'PDFfile' objects></dt>
-<dd><code>Mandatory string for PDF/X-3 or the PDF will fail PDF/X-3 conformance. We recommend you use the title of the document.</code></dd>
-
-<dt><strong>intenti</strong> = <member 'intenti' of 'PDFfile' objects></dt>
-<dd><code>Rendering intent for images<br>
-0 - Perceptual<br>
-1 - Relative Colorimetric<br>
-2 - Saturation<br>
-3 - Absolute Colorimetric</code></dd>
-
-<dt><strong>intents</strong> = <member 'intents' of 'PDFfile' objects></dt>
-<dd><code>Rendering intent for solid colors<br>
-0 - Perceptual<br>
-1 - Relative Colorimetric<br>
-2 - Saturation<br>
-3 - Absolute Colorimetric</code></dd>
-
-<dt><strong>lpival</strong> = <attribute 'lpival' of 'PDFfile' objects></dt>
-<dd><code>Rendering Settings for individual colors.<br>
-<pre>
-This is list of values for each color.
-Color values have structure [siii] which stand for:
- s - Color name ('Black', 'Cyan', 'Magenta', 'Yellow')
- i - Frequency (10 to 1000)
- i - Angle (-180 to 180)
- i - Spot Function
- 0 - Simple Dot
- 1 - Line
- 2 - Round
- 3 - Ellipse
-</pre>
-Be careful when supplying these values as they are not checked for validity.</code></dd>
-
-<dt><strong>noembicc</strong> = <member 'noembicc' of 'PDFfile' objects></dt>
-<dd><code>Don't use embedded ICC profiles. Bool value</code></dd>
-
-<dt><strong>outdst</strong> = <member 'outdst' of 'PDFfile' objects></dt>
-<dd><code>Output destination.<br>
-0 - screen<br>
-1 - printer</code></dd>
-
-<dt><strong>owner</strong> = <attribute 'owner' of 'PDFfile' objects></dt>
-<dd><code>Owner's password</code></dd>
-
-<dt><strong>pages</strong> = <attribute 'pages' of 'PDFfile' objects></dt>
-<dd><code>List of pages to print</code></dd>
-
-<dt><strong>presentation</strong> = <member 'presentation' of 'PDFfile' objects></dt>
-<dd><code>Enable Presentation Effects.Bool value</code></dd>
-
-<dt><strong>printprofc</strong> = <attribute 'printprofc' of 'PDFfile' objects></dt>
-<dd><code>Output profile for printing. If possible, get some guidance from your printer on profile selection.</code></dd>
-
-<dt><strong>profilei</strong> = <member 'profilei' of 'PDFfile' objects></dt>
-<dd><code>Embed a color profile for images. Bool value.</code></dd>
-
-<dt><strong>profiles</strong> = <member 'profiles' of 'PDFfile' objects></dt>
-<dd><code>Embed a color profile for solid colors. Bool value.</code></dd>
-
-<dt><strong>quality</strong> = <member 'quality' of 'PDFfile' objects></dt>
-<dd><code>Image quality<br>
-0 - Maximum<br>
-1 - High<br>
-2 - Medium<br>
-3 - Low<br>
-4 - Minimum</code></dd>
-
-<dt><strong>resolution</strong> = <attribute 'resolution' of 'PDFfile' objects></dt>
-<dd><code>Resolution of output file. Values from 35 to 4000.</code></dd>
-
-<dt><strong>solidpr</strong> = <attribute 'solidpr' of 'PDFfile' objects></dt>
-<dd><code>Color profile for solid colors</code></dd>
-
-<dt><strong>thumbnails</strong> = <member 'thumbnails' of 'PDFfile' objects></dt>
-<dd><code>Generate thumbnails. Bool value.</code></dd>
-
-<dt><strong>uselpi</strong> = <member 'uselpi' of 'PDFfile' objects></dt>
-<dd><code>Use Custom Rendering Settings. Bool value</code></dd>
-
-<dt><strong>user</strong> = <attribute 'user' of 'PDFfile' objects></dt>
-<dd><code>User's password</code></dd>
-
-<dt><strong>version</strong> = <member 'version' of 'PDFfile' objects></dt>
-<dd><code>Choose PDF version to use:<br>
-11 = PDF/X-1a<br>
-12 = PDF/X-3<br>
-13 = PDF 1.3 (Acrobat 4)<br>
-14 = PDF 1.4 (Acrobat 5)<br>
-15 = PDF 1.5 (Acrobat 6)</code></dd>
-
-</dl>
-</body>
-</html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>Python: class PDFfile</title>
+</head>
+<body>
+<h2>Python: class PDFfile</h2>
+<p><a name="PDFfile">class <strong>PDFfile</strong></a>(<a href="__builtin__.html#object">object</a>)
+</p>
+<hr />
+<p>Methods defined here:</p>
+<dl>
+ <dt><a name="PDFfile-Save"><strong>Save</strong></a>(...)</dt>
+ <dd><code>This method is deprecated - use <a href="#PDFfile-save">save</a>() instead.</code></dd>
+
+ <dt><a name="PDFfile-__init__"><strong>__init__</strong></a>(...)</dt>
+ <dd><code>x.<a href="#PDFfile-__init__">__init__</a>(...) initializes x; see x.__class__.__doc__ for signature</code></dd>
+
+ <dt><a name="PDFfile-save"><strong>save</strong></a>(...)</dt>
+ <dd><code>Save selected pages to pdf file</code></dd>
+</dl>
+
+<hr>
+<p>Data and other attributes defined here:</p>
+<dl>
+ <dt><strong>__new__</strong> = <built-in method __new__ of type object></dt>
+ <dd><code>T.<a href="#PDFfile-__new__">__new__</a>(S, ...) -> a new object with type S, a subtype of T</code></dd>
+
+ <dt><strong>aanot</strong> = <member 'aanot' of 'PDFfile' objects></dt>
+ <dd><code>Allow Adding Annotations and Fields. Bool value</code></dd>
+
+ <dt><strong>achange</strong> = <member 'achange' of 'PDFfile' objects></dt>
+ <dd><code>Allow Changing the Document. Bool value</code></dd>
+
+ <dt><strong>acopy</strong> = <member 'acopy' of 'PDFfile' objects></dt>
+ <dd><code>Allow Copying Text and Graphics. Bool value</code></dd>
+
+ <dt><strong>aprint</strong> = <member 'aprint' of 'PDFfile' objects></dt>
+ <dd><code>Allow Printing the Document. Bool value</code></dd>
+
+ <dt><strong>article</strong> = <member 'article' of 'PDFfile' objects></dt>
+ <dd><code>Save Linked Text Frames as PDF Articles<br> Bool value</code></dd>
+
+ <dt><strong>binding</strong> = <member 'binding' of 'PDFfile' objects></dt>
+ <dd><code>Choose binding.<br>
+ 0 - Left binding<br>
+ 1 - Right binding</code></dd>
+
+ <dt><strong>bleedMarks</strong> = <attribute 'bleedMarks' of 'PDFfile' objects></dt>
+ <dd><code>Create marks delimiting the bleed area.</code></dd>
+
+ <dt><strong>bleedb</strong> = <member 'bleedb' of 'PDFfile' objects></dt>
+ <dd><code>Bleed Bottom<br>Distance for bleed from the bottom of the physical page</code></dd>
+
+ <dt><strong>bleedl</strong> = <member 'bleedl' of 'PDFfile' objects></dt>
+ <dd><code>Bleed Left<br>Distance for bleed from the left of the physical page</code></dd>
+
+ <dt><strong>bleedr</strong> = <member 'bleedr' of 'PDFfile' objects></dt>
+ <dd><code>Bleed Right<br>Distance for bleed from the right of the physical page</code></dd>
+
+ <dt><strong>bleedt</strong> = <member 'bleedt' of 'PDFfile' objects></dt>
+ <dd><code>Bleed Top<br>Distance for bleed from the top of the physical page</code></dd>
+
+ <dt><strong>bookmarks</strong> = <member 'bookmarks' of 'PDFfile' objects></dt>
+ <dd><code>Embed the bookmarks you created in your document.<br>These are useful for navigating long PDF documents.<br>Bool value</code></dd>
+
+ <dt><strong>colorMarks</strong> = <member 'colorMarks' of 'PDFfile' objects></dt>
+ <dd><code>Add color calibration bars.</code></dd>
+
+ <dt><strong>compress</strong> = <member 'compress' of 'PDFfile' objects></dt>
+ <dd><code>Compression switch. Bool value.</code></dd>
+
+ <dt><strong>compressmtd</strong> = <member 'compressmtd' of 'PDFfile' objects></dt>
+ <dd><code>Compression method.<br>
+ 0 - Automatic<br>
+ 1 - JPEG<br>
+ 2 - zip<br>
+ 3 - None.</code></dd>
+
+ <dt><strong>cropMarks</strong> = <attribute 'cropMarks' of 'PDFfile' objects></dt>
+ <dd><code>Create crop marks in the PDF indicating where the paper should be cut or trimmed after printing.</code></dd>
+
+ <dt><strong>displayBookmarks</strong> = <attribute 'displayBookmarks' of 'PDFfile' objects></dt>
+ <dd><code>Display the bookmarks upon opening.</code></dd>
+
+ <dt><strong>displayFullscreen</strong> = <attribute 'displayFullscreen' of 'PDFfile' objects></dt>
+ <dd><code>Display the document in full screen mode upon opening.</code></dd>
+
+ <dt><strong>displayLayers</strong> = <attribute 'displayLayers' of 'PDFfile' objects></dt>
+ <dd><code>Display the layer list upon opening. Useful only for PDF 1.5+.</code></dd>
+
+ <dt><strong>displayThumbs</strong> = <attribute 'displayThumbs' of 'PDFfile' objects></dt>
+ <dd><code>Display the page thumbnails upon opening.</code></dd>
+
+ <dt><strong>docInfoMarks</strong> = <member 'docInfoMarks' of 'PDFfile' objects></dt>
+ <dd><code>Add document information which includes the document title and page numbers.</code></dd>
+
+ <dt><strong>doClip</strong> = <attribute 'doClip' of 'PDFfile' objects></dt>
+ <dd><code>Do not show objects outside the margins in the exported file.</code></dd>
+
+ <dt><strong>downsample</strong> = <attribute 'downsample' of 'PDFfile' objects></dt>
+ <dd><code>Downsample image resolusion to this value. Values from 35 to 4000<br>Set 0 for not to downsample</code></dd>
+
+ <dt><strong>effval</strong> = <attribute 'effval' of 'PDFfile' objects></dt>
+ <dd><code>List of effection values for each saved page.<br>
+ <pre>
+It is list of list of six integers. Those int have the following meaning:
+ - Length of time the page is shown before the presentation
+ starts on the selected page. (1-3600)
+ - Length of time the effect runs. (1 - 3600)
+ A shorter time will speed up the effect, a longer one will slow it down
+ - Type of the display effect
+ 0 - No Effect
+ 1 - Blinds
+ 2 - Box
+ 3 - Dissolve
+ 4 - Glitter
+ 5 - Split
+ 6 - Wipe
+ - Direction of the effect of moving lines for the split and blind effects.
+ 0 - Horizontal
+ 1 - Vertical
+ - Starting position for the box and split effects.
+ 0 - Inside
+ 1 - Outside
+ - Direction of the glitter or wipe effects.
+ 0 - Left to Right
+ 1 - Top to Bottom
+ 2 - Bottom to Top
+ 3 - Right to Left
+ 4 - Top-left to Bottom-Right
+</pre></code></dd>
+
+<dt><strong>embedPDF</strong> = <member 'embedPDF' of 'PDFfile' objects></dt>
+<dd><code>Export PDFs in image frames as embedded PDFs.<br>
+This does *not* yet take care of colorspaces, so you should know what you are doing before setting this to 'true'.<br>
+Bool value.</code></dd>
+
+<dt><strong>encrypt</strong> = <member 'encrypt' of 'PDFfile' objects></dt>
+<dd><code>Use Encription. Bool value</code></dd>
+
+<dt><strong>file</strong> = <attribute 'file' of 'PDFfile' objects></dt>
+<dd><code>Name of file to save into</code></dd>
+
+<dt><strong>fitWindow</strong> = <attribute 'fitWindow' of 'PDFfile' objects></dt>
+<dd><code>Fit the document page or pages to the available space in the viewer window.</code></dd>
+
+<dt><strong>fonts</strong> = <attribute 'fonts' of 'PDFfile' objects></dt>
+<dd><code>List of fonts to embed.</code></dd>
+
+<dt><strong>hideMenuBar</strong> = <attribute 'hideMenuBar' of 'PDFfile' objects></dt>
+<dd><code>Hides the viewer menu bar, the PDF will display in a plain window.</code></dd>
+
+<dt><strong>hideToolBar</strong> = <attribute 'hideToolBar' of 'PDFfile' objects></dt>
+<dd><code>Hides the viewer toolbar. The toolbar has usually selection and other editing capabilities.</code></dd>
+
+<dt><strong>imagepr</strong> = <attribute 'imagepr' of 'PDFfile' objects></dt>
+<dd><code>Color profile for images</code></dd>
+
+<dt><strong>info</strong> = <attribute 'info' of 'PDFfile' objects></dt>
+<dd><code>Mandatory string for PDF/X-3 or the PDF will fail PDF/X-3 conformance. We recommend you use the title of the document.</code></dd>
+
+<dt><strong>intenti</strong> = <member 'intenti' of 'PDFfile' objects></dt>
+<dd><code>Rendering intent for images<br>
+0 - Perceptual<br>
+1 - Relative Colorimetric<br>
+2 - Saturation<br>
+3 - Absolute Colorimetric</code></dd>
+
+<dt><strong>intents</strong> = <member 'intents' of 'PDFfile' objects></dt>
+<dd><code>Rendering intent for solid colors<br>
+0 - Perceptual<br>
+1 - Relative Colorimetric<br>
+2 - Saturation<br>
+3 - Absolute Colorimetric</code></dd>
+
+<dt><strong>isGrayscale</strong> = <attribute 'isGrayscale' of 'PDFfile' objects></dt>
+<dd><code>Export PDF in grayscale.</code></dd>
+
+<dt><strong>lpival</strong> = <attribute 'lpival' of 'PDFfile' objects></dt>
+<dd><code>Rendering Settings for individual colors.<br>
+<pre>
+This is list of values for each color.
+Color values have structure [siii] which stand for:
+ s - Color name ('Black', 'Cyan', 'Magenta', 'Yellow')
+ i - Frequency (10 to 1000)
+ i - Angle (-180 to 180)
+ i - Spot Function
+ 0 - Simple Dot
+ 1 - Line
+ 2 - Round
+ 3 - Ellipse
+</pre>
+Be careful when supplying these values as they are not checked for validity.</code></dd>
+
+<dt><strong>markOffset</strong> = <member 'markOffset' of 'PDFfile' objects></dt>
+<dd><code>Indicate the distance offset between mark and page area.</code></dd>
+
+<dt><strong>markLength</strong> = <member 'markLength' of 'PDFfile' objects></dt>
+<dd><code>Indicate the length of crop and bleed marks.</code></dd>
+
+<dt><strong>mirrorH</strong> = <member 'mirrorH' of 'PDFfile' objects></dt>
+<dd><code>Mirror Page(s) horizontally. Bool value.</code></dd>
+
+<dt><strong>mirrorV</strong> = <member 'mirrorV' of 'PDFfile' objects></dt>
+<dd><code>Mirror Page(s) vertically. Bool value.</code></dd>
+
+<dt><strong>noembicc</strong> = <member 'noembicc' of 'PDFfile' objects></dt>
+<dd><code>Don't use embedded ICC profiles. Bool value</code></dd>
+
+<dt><strong>outdst</strong> = <member 'outdst' of 'PDFfile' objects></dt>
+<dd><code>Output destination.<br>
+0 - screen<br>
+1 - printer</code></dd>
+
+<dt><strong>owner</strong> = <attribute 'owner' of 'PDFfile' objects></dt>
+<dd><code>Owner's password</code></dd>
+
+<dt><strong>pageLayout</strong> = <attribute 'pageLayout' of 'PDFfile' objects></dt>
+<dd><code>Document layout in PDF viewer:<br>
+0 - Show the document in single page mode<br>
+1 - Show the document in single page mode with the pages displayed continuously end to end like a scroll<br>
+2 - Show the document with facing pages, starting with the first page displayed on the left<br>
+3 - Show the document with facing pages, starting with the first page displayed on the right</code></dd>
+
+<dt><strong>pages</strong> = <attribute 'pages' of 'PDFfile' objects></dt>
+<dd><code>List of pages to print</code></dd>
+
+<dt><strong>presentation</strong> = <member 'presentation' of 'PDFfile' objects></dt>
+<dd><code>Enable Presentation Effects.Bool value</code></dd>
+
+<dt><strong>printprofc</strong> = <attribute 'printprofc' of 'PDFfile' objects></dt>
+<dd><code>Output profile for printing. If possible, get some guidance from your printer on profile selection.</code></dd>
+
+<dt><strong>profilei</strong> = <member 'profilei' of 'PDFfile' objects></dt>
+<dd><code>Embed a color profile for images. Bool value.</code></dd>
+
+<dt><strong>profiles</strong> = <member 'profiles' of 'PDFfile' objects></dt>
+<dd><code>Embed a color profile for solid colors. Bool value.</code></dd>
+
+<dt><strong>quality</strong> = <member 'quality' of 'PDFfile' objects></dt>
+<dd><code>Image quality<br>
+0 - Maximum<br>
+1 - High<br>
+2 - Medium<br>
+3 - Low<br>
+4 - Minimum</code></dd>
+
+<dt><strong>registrationMarks</strong> = <attribute 'registrationMarks' of 'PDFfile' objects></dt>
+<dd><code>Add registration marks to each separation.</code></dd>
+
+<dt><strong>resolution</strong> = <attribute 'resolution' of 'PDFfile' objects></dt>
+<dd><code>Resolution of output file. Values from 35 to 4000.</code></dd>
+
+<dt><strong>solidpr</strong> = <attribute 'solidpr' of 'PDFfile' objects></dt>
+<dd><code>Color profile for solid colors</code></dd>
+
+<dt><strong>thumbnails</strong> = <member 'thumbnails' of 'PDFfile' objects></dt>
+<dd><code>Generate thumbnails. Bool value.</code></dd>
+
+<dt><strong>usedocbleeds</strong> = <attribute 'usedocbleeds' of 'PDFfile' objects></dt>
+<dd><code>Use the existing bleed settings from the document preferences. Bool value.</code></dd>
+
+<dt><strong>useLayers</strong> = <attribute 'useLayers' of 'PDFfile' objects></dt>
+<dd><code>Layers in your document are exported to the PDF. Only available with PDF >= 1.5.</code></dd>
+
+<dt><strong>uselpi</strong> = <member 'uselpi' of 'PDFfile' objects></dt>
+<dd><code>Use Custom Rendering Settings. Bool value</code></dd>
+
+<dt><strong>user</strong> = <attribute 'user' of 'PDFfile' objects></dt>
+<dd><code>User's password</code></dd>
+
+<dt><strong>version</strong> = <member 'version' of 'PDFfile' objects></dt>
+<dd><code>Choose PDF version to use:<br>
+11 = PDF/X-1a<br>
+12 = PDF/X-3<br>
+13 = PDF 1.3 (Acrobat 4)<br>
+14 = PDF 1.4 (Acrobat 5)<br>
+15 = PDF 1.5 (Acrobat 6)</code></dd>
+
+</dl>
+</body>
+</html>
Modified: trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19746&path=/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp Sat Jan 10 11:05:54 2015
@@ -57,6 +57,7 @@
int colorMarks; // bool -
int docInfoMarks; // bool -
double markOffset; // double -
+ double markLength; // double -
int compress; // bool -
int compressmtd; // int - 0=automatic 1=jpeg 2=zip 3=none
int quality; // int - 0=Maximum 4=minimum
@@ -184,6 +185,8 @@
self->docInfoMarks = 0;
// set mark offset attribute
self->markOffset = 0;
+// set mark length attribute
+ self->markLength = 0;
// set compress attribute
self->compress = 0;
// set compressmtd attribute
@@ -432,7 +435,9 @@
// output doc info marks ?
self->docInfoMarks = pdfOptions.docInfoMarks;
// cropmarks offset
- self->markOffset = pdfOptions.markOffset;
+ self->markOffset = pdfOptions.markOffset * currentDoc->unitRatio();
+// cropmarks length
+ self->markLength = pdfOptions.markLength * currentDoc->unitRatio();
// set automatic compression
self->compress = pdfOptions.Compress;
self->compressmtd = pdfOptions.CompressMethod;
@@ -663,6 +668,7 @@
{const_cast<char*>("colorMarks"), T_INT, offsetof(PDFfile, colorMarks), 0, const_cast<char*>("Add color calibration bars.")},
{const_cast<char*>("docInfoMarks"), T_INT, offsetof(PDFfile, docInfoMarks), 0, const_cast<char*>("Add document information which includes the document title and page numbers.")},
{const_cast<char*>("markOffset"), T_DOUBLE, offsetof(PDFfile, markOffset), 0, const_cast<char*>("Indicate the distance offset between mark and page area.")},
+ {const_cast<char*>("markLength"), T_DOUBLE, offsetof(PDFfile, markLength), 0, const_cast<char*>("Indicate the length of crop and bleed marks.")},
{const_cast<char*>("compress"), T_INT, offsetof(PDFfile, compress), 0, const_cast<char*>("Compression switch. Bool value.")},
{const_cast<char*>("compressmtd"), T_INT, offsetof(PDFfile, compressmtd), 0, const_cast<char*>("Compression method.\n\t0 - Automatic\n\t1 - JPEG\n\t2 - zip\n\t3 - None.")},
{const_cast<char*>("quality"), T_INT, offsetof(PDFfile, quality), 0, const_cast<char*>("Image quality\n\t0 - Maximum\n\t1 - High\n\t2 - Medium\n\t3 - Low\n\t4 - Minimum")},
@@ -1256,7 +1262,9 @@
// apply docInfoMark attribute
pdfOptions.docInfoMarks = self->docInfoMarks;
// apply mark offset attribute
- pdfOptions.markOffset = self->markOffset;
+ pdfOptions.markOffset = qMax(0.0, self->markOffset / currentDoc->unitRatio());
+// apply mark length attribute
+ pdfOptions.markLength = qMax(0.0, self->markLength / currentDoc->unitRatio());
// apply compress attribute
self->compressmtd = minmaxi(self->compressmtd, 0, 3);
pdfOptions.Compress = self->compress;
@@ -1441,12 +1449,6 @@
pdfOptions.hideToolBar = self->hideToolBar;
pdfOptions.hideMenuBar = self->hideMenuBar;
pdfOptions.fitWindow = self->fitWindow;
- pdfOptions.cropMarks = self->cropMarks;
- pdfOptions.bleedMarks = self->bleedMarks;
- pdfOptions.registrationMarks = self->registrationMarks;
- pdfOptions.colorMarks = self->colorMarks;
- pdfOptions.docInfoMarks = self->docInfoMarks;
- pdfOptions.markOffset = self->markOffset;
pdfOptions.openAction = QString(PyString_AsString(self->openAction));
pdfOptions.firstUse = false;
More information about the scribus-commit
mailing list