r20126 by jghali - allow font embedding mode to be controlled from scripter
scribus-commit
scribus-commit at lists.scribus.net
Sun May 24 12:17:24 UTC 2015
Author: jghali
Date: Sun May 24 12:17:23 2015
New Revision: 20126
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20126
Log:
allow font embedding mode to be controlled from scripter
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=20126&path=/trunk/Scribus/doc/de/scripterapi-PDFfile.html
==============================================================================
--- trunk/Scribus/doc/de/scripterapi-PDFfile.html (original)
+++ trunk/Scribus/doc/de/scripterapi-PDFfile.html Sun May 24 12:17:23 2015
@@ -39,30 +39,30 @@
<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>
+ <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>
+ <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>
+ <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>
+ <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>
+ <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>
+ <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>
+ <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>
@@ -71,10 +71,10 @@
<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>
+ <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>
@@ -99,10 +99,10 @@
<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>
+ <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>
+ <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
@@ -132,8 +132,8 @@
</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>
+<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>
@@ -145,6 +145,12 @@
<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>fontEmbedding</strong> = <attribute 'fontEmbedding' of 'PDFfile' objects></dt>
+<dd><code>Choose the font embedding mode :<br/>
+0 - Embed fonts fully or as subset depending on 'fonts' attribute<br/>
+1 - Outline fonts: fonts will be converted to vector<br/>
+2 - No embedding: no font will be embedded.</code></dd>
+
<dt><strong>fonts</strong> = <attribute 'fonts' of 'PDFfile' objects></dt>
<dd><code>List of fonts to embed.</code></dd>
@@ -161,24 +167,24 @@
<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>
+<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>
+<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>
+<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:
@@ -209,18 +215,18 @@
<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>
+<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>
+<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>
@@ -239,11 +245,11 @@
<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>
+<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>
@@ -271,11 +277,11 @@
<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>
+<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>
Modified: trunk/Scribus/doc/en/scripterapi-PDFfile.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20126&path=/trunk/Scribus/doc/en/scripterapi-PDFfile.html
==============================================================================
--- trunk/Scribus/doc/en/scripterapi-PDFfile.html (original)
+++ trunk/Scribus/doc/en/scripterapi-PDFfile.html Sun May 24 12:17:23 2015
@@ -42,30 +42,30 @@
<dd><p>Allow printing the Document. Bool value</p></dd>
<dt><strong>article</strong> = <member 'article' of 'PDFfile' objects></dt>
- <dd><p>Save linked text frames as PDF articles<br> Bool value</p></dd>
+ <dd><p>Save linked text frames as PDF articles<br/> Bool value</p></dd>
<dt><strong>binding</strong> = <member 'binding' of 'PDFfile' objects></dt>
- <dd><p>Choose binding.<br>
- 0 - Left binding<br>
+ <dd><p>Choose binding.<br/>
+ 0 - Left binding<br/>
1 - Right binding</p></dd>
<dt><strong>bleedMarks</strong> = <attribute 'bleedMarks' of 'PDFfile' objects></dt>
<dd><p>Create marks delimiting the bleed area.</p></dd>
<dt><strong>bleedb</strong> = <member 'bleedb' of 'PDFfile' objects></dt>
- <dd><p>Bleed Bottom<br>Distance for bleed from the bottom of the physical page</p></dd>
+ <dd><p>Bleed Bottom<br/>Distance for bleed from the bottom of the physical page</p></dd>
<dt><strong>bleedl</strong> = <member 'bleedl' of 'PDFfile' objects></dt>
- <dd><p>Bleed Left<br>Distance for bleed from the left of the physical page</p></dd>
+ <dd><p>Bleed Left<br/>Distance for bleed from the left of the physical page</p></dd>
<dt><strong>bleedr</strong> = <member 'bleedr' of 'PDFfile' objects></dt>
- <dd><p>Bleed Right<br>Distance for bleed from the right of the physical page</p></dd>
+ <dd><p>Bleed Right<br/>Distance for bleed from the right of the physical page</p></dd>
<dt><strong>bleedt</strong> = <member 'bleedt' of 'PDFfile' objects></dt>
- <dd><p>Bleed Top<br>Distance for bleed from the top of the physical page</p></dd>
+ <dd><p>Bleed Top<br/>Distance for bleed from the top of the physical page</p></dd>
<dt><strong>bookmarks</strong> = <member 'bookmarks' of 'PDFfile' objects></dt>
- <dd><p>Embed the bookmarks you created in your document.<br>These are useful for navigating long PDF documents.<br>Bool value</p></dd>
+ <dd><p>Embed the bookmarks you created in your document.<br/>These are useful for navigating long PDF documents.<br/>Bool value</p></dd>
<dt><strong>colorMarks</strong> = <member 'colorMarks' of 'PDFfile' objects></dt>
<dd><p>Add color calibration bars.</p></dd>
@@ -74,10 +74,10 @@
<dd><p>Compression switch. Bool value.</p></dd>
<dt><strong>compressmtd</strong> = <member 'compressmtd' of 'PDFfile' objects></dt>
- <dd><p>Compression method.<br>
- 0 - Automatic<br>
- 1 - JPEG<br>
- 2 - zip<br>
+ <dd><p>Compression method.<br/>
+ 0 - Automatic<br/>
+ 1 - JPEG<br/>
+ 2 - zip<br/>
3 - None.</p></dd>
<dt><strong>cropMarks</strong> = <attribute 'cropMarks' of 'PDFfile' objects></dt>
@@ -102,10 +102,10 @@
<dd><p>Do not show objects outside the margins in the exported file.</p></dd>
<dt><strong>downsample</strong> = <attribute 'downsample' of 'PDFfile' objects></dt>
- <dd><p>Downsample image resolusion to this value. Values from 35 to 4000<br>Set 0 for not to downsample</p></dd>
+ <dd><p>Downsample image resolusion to this value. Values from 35 to 4000<br/>Set 0 for not to downsample</p></dd>
<dt><strong>effval</strong> = <attribute 'effval' of 'PDFfile' objects></dt>
- <dd><p>List of effection values for each saved page.<br>
+ <dd><p>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
@@ -136,8 +136,8 @@
</dl>
<dl>
<dt><strong>embedPDF</strong> = <member 'embedPDF' of 'PDFfile' objects></dt>
-<dd><p>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>
+<dd><p>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.</p></dd>
<dt><strong>encrypt</strong> = <member 'encrypt' of 'PDFfile' objects></dt>
@@ -149,6 +149,12 @@
<dt><strong>fitWindow</strong> = <attribute 'fitWindow' of 'PDFfile' objects></dt>
<dd><p>Fit the document page or pages to the available space in the viewer window.</p></dd>
+<dt><strong>fontEmbedding</strong> = <attribute 'fontEmbedding' of 'PDFfile' objects></dt>
+<dd><p>Choose the font embedding mode :<br/>
+0 - Embed fonts fully or as subset depending on 'fonts' attribute<br/>
+1 - Outline fonts: fonts will be converted to vector<br/>
+2 - No embedding: no font will be embedded.</p></dd>
+
<dt><strong>fonts</strong> = <attribute 'fonts' of 'PDFfile' objects></dt>
<dd><p>List of fonts to embed.</p></dd>
@@ -165,24 +171,24 @@
<dd><p>Mandatory string for PDF/X-3 or the PDF will fail PDF/X-3 conformance. We recommend you use the title of the document.</p></dd>
<dt><strong>intenti</strong> = <member 'intenti' of 'PDFfile' objects></dt>
-<dd><p>Rendering intent for images<br>
-0 - Perceptual<br>
-1 - Relative Colorimetric<br>
-2 - Saturation<br>
+<dd><p>Rendering intent for images<br/>
+0 - Perceptual<br/>
+1 - Relative Colorimetric<br/>
+2 - Saturation<br/>
3 - Absolute Colorimetric</p></dd>
<dt><strong>intents</strong> = <member 'intents' of 'PDFfile' objects></dt>
-<dd><p>Rendering intent for solid colors<br>
-0 - Perceptual<br>
-1 - Relative Colorimetric<br>
-2 - Saturation<br>
+<dd><p>Rendering intent for solid colors<br/>
+0 - Perceptual<br/>
+1 - Relative Colorimetric<br/>
+2 - Saturation<br/>
3 - Absolute Colorimetric</p></dd>
<dt><strong>isGrayscale</strong> = <attribute 'isGrayscale' of 'PDFfile' objects></dt>
<dd><p>Export PDF in grayscale.</p></dd>
<dt><strong>lpival</strong> = <attribute 'lpival' of 'PDFfile' objects></dt>
-<dd><p>Rendering Settings for individual colors.<br>
+<dd><p>Rendering Settings for individual colors.<br/>
<pre>
This is list of values for each color.
Color values have structure [siii] which stand for:
@@ -213,18 +219,18 @@
<dd><p>Don't use embedded ICC profiles. Bool value</p></dd>
<dt><strong>outdst</strong> = <member 'outdst' of 'PDFfile' objects></dt>
-<dd><p>Output destination.<br>
-0 - screen<br>
+<dd><p>Output destination.<br/>
+0 - screen<br/>
1 - printer</p></dd>
<dt><strong>owner</strong> = <attribute 'owner' of 'PDFfile' objects></dt>
<dd><p>Owner's password</p></dd>
<dt><strong>pageLayout</strong> = <attribute 'pageLayout' of 'PDFfile' objects></dt>
-<dd><p>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>
+<dd><p>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</p></dd>
<dt><strong>pages</strong> = <attribute 'pages' of 'PDFfile' objects></dt>
@@ -243,11 +249,11 @@
<dd><p>Embed a color profile for solid colors. Bool value.</p></dd>
<dt><strong>quality</strong> = <member 'quality' of 'PDFfile' objects></dt>
-<dd><p>Image quality<br>
-0 - Maximum<br>
-1 - High<br>
-2 - Medium<br>
-3 - Low<br>
+<dd><p>Image quality<br/>
+0 - Maximum<br/>
+1 - High<br/>
+2 - Medium<br/>
+3 - Low<br/>
4 - Minimum</p></dd>
<dt><strong>registrationMarks</strong> = <attribute 'registrationMarks' of 'PDFfile' objects></dt>
@@ -275,11 +281,11 @@
<dd><p>User's password</p></dd>
<dt><strong>version</strong> = <member 'version' of 'PDFfile' objects></dt>
-<dd><p>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>
+<dd><p>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)</p></dd>
</dl>
Modified: trunk/Scribus/doc/fr/scripterapi-PDFfile.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20126&path=/trunk/Scribus/doc/fr/scripterapi-PDFfile.html
==============================================================================
--- trunk/Scribus/doc/fr/scripterapi-PDFfile.html (original)
+++ trunk/Scribus/doc/fr/scripterapi-PDFfile.html Sun May 24 12:17:23 2015
@@ -39,30 +39,30 @@
<dd><code>Autorise l'impression du document. Valeur booléenne</code></dd>
<dt><strong>article</strong> = <membre 'article' de la classe 'PDFfile'></dt>
- <dd><code>Enregistre les cadres de texte liés en tant qu'articles PDF<br> Valeur booléenne</code></dd>
+ <dd><code>Enregistre les cadres de texte liés en tant qu'articles PDF<br/> Valeur booléenne</code></dd>
<dt><strong>binding</strong> = <membre 'binding' de la classe 'PDFfile'></dt>
- <dd><code>Indique la liaison.<br>
- 0 - Liaison à gauche<br>
+ <dd><code>Indique la liaison.<br/>
+ 0 - Liaison à gauche<br/>
1 - Liaison à droite</code></dd>
<dt><strong>bleedMarks</strong> = <membre 'bleedMarks' de la classe 'PDFfile'></dt>
<dd><code>Crée les repères délimitant la zone de fond perdus.</code></dd>
<dt><strong>bleedb</strong> = <membre 'bleedb' de la classe 'PDFfile'></dt>
- <dd><code>Marge de coupe du bas<br>Distance pour la coupe à partir du bas de la page physique</code></dd>
+ <dd><code>Marge de coupe du bas<br/>Distance pour la coupe à partir du bas de la page physique</code></dd>
<dt><strong>bleedl</strong> = <membre 'bleedl' de la classe 'PDFfile'></dt>
- <dd><code>Marge de coupe de gauche<br>Distance pour la coupe à partir de la gauche de la page physique</code></dd>
+ <dd><code>Marge de coupe de gauche<br/>Distance pour la coupe à partir de la gauche de la page physique</code></dd>
<dt><strong>bleedr</strong> = <membre 'bleedr' de la classe 'PDFfile'></dt>
- <dd><code>Marge de coupe de droite<br>Distance pour la coupe à partir de la droite de la page physique</code></dd>
+ <dd><code>Marge de coupe de droite<br/>Distance pour la coupe à partir de la droite de la page physique</code></dd>
<dt><strong>bleedt</strong> = <membre 'bleedt' de la classe 'PDFfile'></dt>
- <dd><code>Marge de coupe du haut<br>Distance pour la coupe à partir du haut de la page physique</code></dd>
+ <dd><code>Marge de coupe du haut<br/>Distance pour la coupe à partir du haut de la page physique</code></dd>
<dt><strong>bookmarks</strong> = <membre 'bookmarks' de la classe 'PDFfile'></dt>
- <dd><code>Inclus les signets que vous avez créés dans votre document.<br>Ils sont utiles pour la navigation dans de longs documents PDF.<br>Valeur booléenne</code></dd>
+ <dd><code>Inclus les signets que vous avez créés dans votre document.<br/>Ils sont utiles pour la navigation dans de longs documents PDF.<br/>Valeur booléenne</code></dd>
<dt><strong>colorMarks</strong> = <membre 'colorMarks' de la classe 'PDFfile'></dt>
<dd><code>Ajoute les barres de contrôles.</code></dd>
@@ -71,10 +71,10 @@
<dd><code>Indicateur de compression. Valeur booléenne.</code></dd>
<dt><strong>compressmtd</strong> = <membre 'compressmtd' de la classe 'PDFfile'></dt>
- <dd><code>Méthode de compression.<br>
- 0 - Automatique<br>
- 1 - JPEG<br>
- 2 - zip<br>
+ <dd><code>Méthode de compression.<br/>
+ 0 - Automatique<br/>
+ 1 - JPEG<br/>
+ 2 - zip<br/>
3 - Aucune.</code></dd>
<dt><strong>cropMarks</strong> = <membre 'cropMarks' de la classe 'PDFfile'></dt>
@@ -100,10 +100,10 @@
<dt><strong>downsample</strong> = <attribut 'downsample' de la classe 'PDFfile'></dt>
<dd><code>Réduit la résolution de l'image à cette valeur. Les
-valeurs sont comprises entre 35 et 4000<br>Mettre à 0 pour ne pas modifier la résolution</code></dd>
+valeurs sont comprises entre 35 et 4000<br/>Mettre à 0 pour ne pas modifier la résolution</code></dd>
<dt><strong>effval</strong> = <attribut 'effval' de la classe 'PDFfile'></dt>
- <dd><code>Liste des valeurs des effets pour chaque page enregistrée.<br>
+ <dd><code>Liste des valeurs des effets pour chaque page enregistrée.<br/>
<pre>
Il s'agit d'une liste de six nombres entiers. Ils ont la signification suivante:
- Durée d'affichage de la page avant que la présentation
@@ -133,8 +133,8 @@
</pre></code></dd>
<dt><strong>embedPDF</strong> = <membre 'embedPDF' de la classe 'PDFfile'>;</dt>
-<dd><code>Exporte les fichiers EPS et PDF chargés dans des cadres d'images sous forme d'objets PDF.<br>
-Cette fonctionnalité ne traite pas les espaces de couleurs, en conséquence cette option ne doit être activée qu'en connaissance de cause.<br>
+<dd><code>Exporte les fichiers EPS et PDF chargés dans des cadres d'images sous forme d'objets PDF.<br/>
+Cette fonctionnalité ne traite pas les espaces de couleurs, en conséquence cette option ne doit être activée qu'en connaissance de cause.<br/>
Valeur booléenne.</code></dd>
<dt><strong>encrypt</strong> = <membre 'encrypt' de la classe 'PDFfile'></dt>
@@ -146,6 +146,12 @@
<dt><strong>fitWindow</strong> = <attribut 'fitWindow' de la classe 'PDFfile'></dt>
<dd><code>Adapte l'affichage des pages à l'espace disponible dans la fenêtre du visualisateur.</code></dd>
+<dt><strong>fontEmbedding</strong> = <membre 'fontEmbedding' de la classe 'PDFfile' ></dt>
+<dd><code>Mode d'encapsulation des polices:<br/>
+0 - Encapsule les polices en jeux complets ou partiels selon la valeur de l'attribut 'fonts' <br/>
+1 - Incorpore les polices sous forme de vecteurs<br/>
+2 - Pas d'incorporation.</code></dd>
+
<dt><strong>fonts</strong> = <membre 'fonts' de la classe 'PDFfile'></dt>
<dd><code>Liste de polices à inclure.</code></dd>
@@ -162,24 +168,24 @@
<dd><code>Chaîne requise pour PDF/X-3, sinon le PDF ne sera pas conforme à PDF/X-3. Nous vous recommandons d'utiliser le titre du document.</code></dd>
<dt><strong>intenti</strong> = <membre 'intenti' de la classe 'PDFfile'></dt>
-<dd><code>Rendu pour les images<br>
-0 - Perceptuel<br>
-1 - Colorimétrie relative<br>
-2 - Saturation<br>
+<dd><code>Rendu pour les images<br/>
+0 - Perceptuel<br/>
+1 - Colorimétrie relative<br/>
+2 - Saturation<br/>
3 - Colorimétrie absolue</code></dd>
<dt><strong>intents</strong> = <membre 'intents' de la classe 'PDFfile'></dt>
-<dd><code>Rendu pour les couleurs d'accompagnement<br>
-0 - Perceptuel<br>
-1 - Colorimétrie relative<br>
-2 - Saturation<br>
+<dd><code>Rendu pour les couleurs d'accompagnement<br/>
+0 - Perceptuel<br/>
+1 - Colorimétrie relative<br/>
+2 - Saturation<br/>
3 - Colorimétrie absolue</code></dd>
<dt><strong>isGrayscale</strong> = <attribut 'isGrayscale' de la classe 'PDFfile'></dt>
<dd><code>Exporte le fichier PDF en mode niveaux de gris.</code></dd>
<dt><strong>lpival</strong> = <attribut 'lpival' de la classe 'PDFfile'></dt>
-<dd><code>Paramètres du rendu pour des couleurs individuelles.<br>
+<dd><code>Paramètres du rendu pour des couleurs individuelles.<br/>
<pre>
Il s'agit d'une liste de valeurs pour chaque couleur.
Les valeurs des couleurs respectent la structure [siii] qui
@@ -211,18 +217,18 @@
<dd><code>Ne pas utiliser de profils ICC. Valeur booléenne</code></dd>
<dt><strong>outdst</strong> = <membre 'outdst' de la classe 'PDFfile'></dt>
-<dd><code>Destination de sortie.<br>
-0 - écran<br>
+<dd><code>Destination de sortie.<br/>
+0 - écran<br/>
1 - imprimante</code></dd>
<dt><strong>owner</strong> = <attribut 'owner' de la classe 'PDFfile'></dt>
<dd><code>Mot de passe du propriétaire</code></dd>
<dt><strong>pageLayout</strong> = <attribut 'pageLayout' de la classe 'PDFfile'></dt>
-<dd><code>Mode d'affichage du document dans le visualiseur:<br>
-0 - Affiche le document en mode 'pages simples'<br>
-1 - Affiche le document en mode 'pages simples' avec défilement continu<br>
-2 - Affiche le document en mode 'pages doubles' avec la première page affichée à gauche<br>
+<dd><code>Mode d'affichage du document dans le visualiseur:<br/>
+0 - Affiche le document en mode 'pages simples'<br/>
+1 - Affiche le document en mode 'pages simples' avec défilement continu<br/>
+2 - Affiche le document en mode 'pages doubles' avec la première page affichée à gauche<br/>
3 - Affiche le document en mode 'pages doubles' avec la première page affichée à droite</code></dd>
<dt><strong>pages</strong> = <attribut 'pages' de la classe 'PDFfile'></dt>
@@ -241,11 +247,11 @@
<dd><code>Inclus un profil couleur pour les couleurs d'aplats. Valeur booléenne.</code></dd>
<dt><strong>quality</strong> = <membre 'quality' de la classe 'PDFfile'></dt>
-<dd><code>Qualité de l'image<br>
-0 - Maximum<br>
-1 - Haute<br>
-2 - Moyenne<br>
-3 - Basse<br>
+<dd><code>Qualité de l'image<br/>
+0 - Maximum<br/>
+1 - Haute<br/>
+2 - Moyenne<br/>
+3 - Basse<br/>
4 - Minimum</code></dd>
<dt><strong>registrationMarks</strong> = <attribut 'registrationMarks' de la classe 'PDFfile'></dt>
@@ -273,11 +279,11 @@
<dd><code>Mot de passe de l'utilisateur</code></dd>
<dt><strong>version</strong> = <membre 'version' de la classe 'PDFfile'></dt>
-<dd><code>Indique la version de PDF à utiliser:<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>
+<dd><code>Indique la version de PDF à utiliser:<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>
Modified: trunk/Scribus/doc/it/scripterapi-PDFfile.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20126&path=/trunk/Scribus/doc/it/scripterapi-PDFfile.html
==============================================================================
--- trunk/Scribus/doc/it/scripterapi-PDFfile.html (original)
+++ trunk/Scribus/doc/it/scripterapi-PDFfile.html Sun May 24 12:17:23 2015
@@ -39,30 +39,30 @@
<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>
+ <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>
+ <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>
+ <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>
+ <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>
+ <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>
+ <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>
+ <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>
@@ -71,10 +71,10 @@
<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>
+ <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>
@@ -99,10 +99,10 @@
<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>
+ <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>
+ <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
@@ -132,8 +132,8 @@
</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>
+<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>
@@ -145,6 +145,12 @@
<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>fontEmbedding</strong> = <attribute 'fontEmbedding' of 'PDFfile' objects></dt>
+<dd><code>Choose the font embedding mode :<br/>
+0 - Embed fonts fully or as subset depending on 'fonts' attribute<br/>
+1 - Outline fonts: fonts will be converted to vector<br/>
+2 - No embedding: no font will be embedded.</code></dd>
+
<dt><strong>fonts</strong> = <attribute 'fonts' of 'PDFfile' objects></dt>
<dd><code>List of fonts to embed.</code></dd>
@@ -161,24 +167,24 @@
<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>
+<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>
+<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>
+<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:
@@ -209,18 +215,18 @@
<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>
+<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>
+<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>
@@ -239,11 +245,11 @@
<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>
+<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>
@@ -271,11 +277,11 @@
<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>
+<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>
Modified: trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20126&path=/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp Sun May 24 12:17:23 2015
@@ -47,6 +47,7 @@
{
PyObject_HEAD
PyObject *file; // string - file to save into
+ PyObject *fontEmbedding; // int - 0: Embed fonts, 1:Outline fonts, 2:Dont embed any font
PyObject *fonts; // list of string - fonts to embed
PyObject *subsetList; // list of string - fonts to outline
PyObject *pages; // list of int - pages to print
@@ -118,6 +119,7 @@
static void PDFfile_dealloc(PDFfile *self)
{
Py_XDECREF(self->file);
+ Py_XDECREF(self->fontEmbedding);
Py_XDECREF(self->fonts);
Py_XDECREF(self->subsetList);
Py_XDECREF(self->pages);
@@ -150,7 +152,13 @@
if (self) {
// set file attribute
self->file = PyString_FromString("");
- if (!self->file){
+ if (!self->file) {
+ Py_DECREF(self);
+ return NULL;
+ }
+// set font embedding mode attribute
+ self->fontEmbedding = PyInt_FromLong(0);
+ if (!self->fontEmbedding) {
Py_DECREF(self);
return NULL;
}
@@ -341,6 +349,16 @@
PyErr_SetString(PyExc_SystemError, "Can not initialize 'file' attribute");
return -1;
}
+// font embedding mode
+ PyObject *embeddingMode = NULL;
+ embeddingMode = PyInt_FromLong(0);
+ if (embeddingMode){
+ Py_DECREF(self->fontEmbedding);
+ self->fontEmbedding = embeddingMode;
+ } else {
+ PyErr_SetString(PyExc_SystemError, "Can not initialize 'fontEmbedding' attribute");
+ return -1;
+ }
// embed all used fonts
PyObject *fonts = NULL;
fonts = PyList_New(0);
@@ -354,26 +372,23 @@
// get all used fonts
QMap<QString,int> ReallyUsed = currentDoc->UsedFonts;
// create list of all used fonts
- QList<QString> tmpEm;
- tmpEm = ReallyUsed.keys();
- QList<QString>::Iterator itef;
- for (itef = tmpEm.begin(); itef != tmpEm.end(); ++itef) {
-// AV: dunno what this is for, but it looks as if it's the only place where HasMetrics is used...
-// if (PrefsManager::instance()->appPrefs.AvailFonts[(*itef).toLatin1()]->HasMetrics) {
- PyObject *tmp= NULL;
- tmp = PyString_FromString((*itef).toLatin1());
- if (tmp) {
- PyList_Append(self->fonts, tmp);
+ QList<QString> tmpEm = ReallyUsed.keys();
+ for (int i = 0; i < tmpEm.count(); ++i)
+ {
+ QString fontName = tmpEm.at(i);
+ PyObject *tmp= NULL;
+ tmp = PyString_FromString(fontName.toLatin1());
+ if (tmp) {
+ PyList_Append(self->fonts, tmp);
// do i need Py_DECREF(tmp) here?
// Does PyList_Append increase reference or 'steal' one from provided argument
// If it 'steal' reference comment next line
- Py_DECREF(tmp);
- }
- else {
- PyErr_SetString(PyExc_SystemError, "Can not initialize 'fonts' attribute");
- return -1;
- }
-// }
+ Py_DECREF(tmp);
+ }
+ else {
+ PyErr_SetString(PyExc_SystemError, "Can not initialize 'fonts' attribute");
+ return -1;
+ }
}
// init subsetList
fonts = PyList_New(0);
@@ -450,7 +465,7 @@
Py_DECREF(self->resolution);
self->resolution = resolution;
} else {
- PyErr_SetString(PyExc_SystemError, "Can not initialize 'resolutin' attribute");
+ PyErr_SetString(PyExc_SystemError, "Can not initialize 'resolution' attribute");
return -1;
}
// do not downsample images
@@ -748,6 +763,33 @@
return 0;
}
+static PyObject *PDFfile_getFontEmbeddingMode(PDFfile *self, void * /*closure*/)
+{
+ Py_INCREF(self->fontEmbedding);
+ return self->fontEmbedding;
+}
+
+static int PDFfile_setFontEmbeddingMode(PDFfile *self, PyObject *value, void * /*closure*/)
+{
+ if (value == NULL) {
+ PyErr_SetString(PyExc_TypeError, "Cannot delete 'fontEmbedding' attribute.");
+ return -1;
+ }
+ if (!PyInt_Check(value)) {
+ PyErr_SetString(PyExc_TypeError, "'fontEmbedding' attribute value must be integer.");
+ return -1;
+ }
+ int n = PyInt_AsLong(value);
+ if (n < 0 || n > 2) {
+ PyErr_SetString(PyExc_ValueError, "'fontEmbedding' value must be an integer between 0 and 2");
+ return -1;
+ }
+ Py_DECREF(self->fontEmbedding);
+ Py_INCREF(value);
+ self->fontEmbedding = value;
+ return 0;
+}
+
static PyObject *PDFfile_getfonts(PDFfile *self, void * /*closure*/)
{
Py_INCREF(self->fonts);
@@ -894,7 +936,7 @@
}
int n = PyInt_AsLong(value);
if (n!=0 && (n<35 || n>PyInt_AsLong(self->resolution))) {
- PyErr_SetString(PyExc_TypeError, "'downsample' value must be 0 or in interval from 35 to value of 'resolutin'");
+ PyErr_SetString(PyExc_TypeError, "'downsample' value must be 0 or in interval from 35 to value of 'resolution'");
return -1;
}
Py_DECREF(self->downsample);
@@ -1193,8 +1235,9 @@
static PyGetSetDef PDFfile_getseters [] = {
{const_cast<char*>("file"), (getter)PDFfile_getfile, (setter)PDFfile_setfile, const_cast<char*>("Name of file to save into"), NULL},
+ {const_cast<char*>("fontEmbedding"), (getter)PDFfile_getFontEmbeddingMode, (setter)PDFfile_setFontEmbeddingMode, const_cast<char*>("Font embedding mode.\n\tValue must be one of integers: 0 (Embed), 1 (Outline), 2 (No embedding)."), NULL},
{const_cast<char*>("fonts"), (getter)PDFfile_getfonts, (setter)PDFfile_setfonts, const_cast<char*>("List of fonts to embed."), NULL},
- {const_cast<char*>("subsetList"), (getter)PDFfile_getSubsetList, (setter)PDFfile_setSubsetList, const_cast<char*>("List of fonts to outlined."), NULL},
+ {const_cast<char*>("subsetList"), (getter)PDFfile_getSubsetList, (setter)PDFfile_setSubsetList, const_cast<char*>("List of fonts to subsetted."), NULL},
{const_cast<char*>("pages"), (getter)PDFfile_getpages, (setter)PDFfile_setpages, const_cast<char*>("List of pages to print"), NULL},
{const_cast<char*>("resolution"), (getter)PDFfile_getresolution, (setter)PDFfile_setresolution, const_cast<char*>("Resolution of output file. Values from 35 to 4000."), NULL},
{const_cast<char*>("downsample"), (getter)PDFfile_getdownsample, (setter)PDFfile_setdownsample, const_cast<char*>("Downsample image resolusion to this value. Values from 35 to 4000\nSet 0 for not to downsample"), NULL},
@@ -1228,10 +1271,15 @@
if (ScCore->primaryMainWindow()->bookmarkPalette->BView->topLevelItemCount() == 0)
pdfOptions.Bookmarks = false;
+// get PDF version
+ self->version = minmaxi(self->version, PDFOptions::PDFVersion_Min, PDFOptions::PDFVersion_Max);
+ pdfOptions.Version = (PDFOptions::PDFVersion) self->version;
+
// apply fonts attribute
pdfOptions.EmbedList.clear();
int n = PyList_Size(self->fonts);
- for ( int i=0; i<n; ++i){
+ for ( int i=0; i<n; ++i)
+ {
QString tmpFon;
tmpFon = QString(PyString_AsString(PyList_GetItem(self->fonts, i)));
pdfOptions.EmbedList.append(tmpFon);
@@ -1239,10 +1287,45 @@
// apply SubsetList attribute
pdfOptions.SubsetList.clear();
n = PyList_Size(self->subsetList);
- for ( int i=0; i<n; ++i){
+ for (int i = 0; i < n; ++i)
+ {
QString tmpFon;
tmpFon = QString(PyString_AsString(PyList_GetItem(self->subsetList, i)));
pdfOptions.SubsetList.append(tmpFon);
+ }
+// apply font embedding mode
+ pdfOptions.FontEmbedding = (PDFOptions::PDFFontEmbedding) PyInt_AsLong(self->fontEmbedding);
+ if (pdfOptions.Version == PDFOptions::PDFVersion_X1a ||
+ pdfOptions.Version == PDFOptions::PDFVersion_X3 ||
+ pdfOptions.Version == PDFOptions::PDFVersion_X4)
+ {
+ pdfOptions.FontEmbedding = PDFOptions::EmbedFonts;
+ }
+ if (pdfOptions.FontEmbedding == PDFOptions::EmbedFonts)
+ {
+ QStringList docFonts = currentDoc->UsedFonts.keys();
+ for (int i = 0; i < docFonts.count(); ++i)
+ {
+ QString fontName = docFonts.at(i);
+ if (pdfOptions.SubsetList.contains(fontName))
+ continue;
+ if (pdfOptions.EmbedList.contains(fontName))
+ continue;
+ pdfOptions.SubsetList.append(fontName);
+ }
+ pdfOptions.OutlineList = QStringList();
+ }
+ else if (pdfOptions.FontEmbedding == PDFOptions::OutlineFonts)
+ {
+ pdfOptions.EmbedList = QStringList();
+ pdfOptions.SubsetList = QStringList();
+ pdfOptions.OutlineList = currentDoc->UsedFonts.keys();
+ }
+ else
+ {
+ pdfOptions.EmbedList = QStringList();
+ pdfOptions.SubsetList = QStringList();
+ pdfOptions.OutlineList = QStringList();
}
// apply file attribute
QString fn;
@@ -1294,55 +1377,44 @@
QList<PDFPresentationData> PresentVals;
PresentVals.clear();
- int tmpnum;
- tmpnum=PyList_Size(self->effval);
- for (int i=0; i<tmpnum; ++i) {
+ int tmpnum = PyList_Size(self->effval);
+ for (int i = 0; i < tmpnum; ++i)
+ {
PDFPresentationData t;
-// How do I make this commented piece of code to work?
-// I always get an error here
PyObject *ti = PyList_GetItem(self->effval, i);
-// if (!PyArg_ParseTuple(ti , "[iiiiii]",
-// &t.pageEffectDuration, &t.pageViewDuration, &t.effectType, &t.Dm,
-// &t.M, &t.Di)) {
-// PyErr_SetString(PyExc_SystemError, "while parsing 'effval'. WHY THIS HAPPENED????");
-// return NULL;
-// }
-// PresentVals.append(t);
- // pv 10/03/2004 crashed when pt is null
- if (ti)
- {
- // Do I Need to check if every PyInt_AsLong and PyList_GetItem funtion succeed???
- t.pageEffectDuration = PyInt_AsLong(PyList_GetItem(ti, 0));
- t.pageViewDuration = PyInt_AsLong(PyList_GetItem(ti, 1));
- t.effectType = PyInt_AsLong(PyList_GetItem(ti, 2));
- t.Dm = PyInt_AsLong(PyList_GetItem(ti, 3));
- t.M = PyInt_AsLong(PyList_GetItem(ti, 4));
- t.Di = PyInt_AsLong(PyList_GetItem(ti, 5));
- // PresentVals.append(t);
- } // if ti=NULL
-
+ if (!ti)
+ continue;
+ // Do I Need to check if every PyInt_AsLong and PyList_GetItem funtion succeed???
+ t.pageEffectDuration = PyInt_AsLong(PyList_GetItem(ti, 0));
+ t.pageViewDuration = PyInt_AsLong(PyList_GetItem(ti, 1));
+ t.effectType = PyInt_AsLong(PyList_GetItem(ti, 2));
+ t.Dm = PyInt_AsLong(PyList_GetItem(ti, 3));
+ t.M = PyInt_AsLong(PyList_GetItem(ti, 4));
+ t.Di = PyInt_AsLong(PyList_GetItem(ti, 5));
+ // PresentVals.append(t);
}
// pdfOptions.PresentVals = PresentVals;
// apply lpival
int n2 = PyList_Size(self->lpival);
- for (int i=0; i<n2; ++i){
+ for (int i = 0; i < n2; ++i)
+ {
LPIData lpi;
PyObject *t = PyList_GetItem(self->lpival, i);
// This code always raise exception - WHY???
// char *s;
-// if (!PyArg_ParseTuple(t, "[siii]", &s, &lpi.Frequency,
-// &lpi.Angle, &lpi.SpotFunc)) {
-// PyErr_SetString(PyExc_SystemError, "while parsing 'lpival'. WHY THIS HAPPENED????");
-// return NULL;
-// }
-// pdfOptions.LPISettings[QString(s)]=lpi;
+// if (!PyArg_ParseTuple(t, "[siii]", &s, &lpi.Frequency,
+// &lpi.Angle, &lpi.SpotFunc)) {
+// PyErr_SetString(PyExc_SystemError, "while parsing 'lpival'. WHY THIS HAPPENED????");
+// return NULL;
+// }
+// pdfOptions.LPISettings[QString(s)]=lpi;
QString st;
st = QString(PyString_AsString(PyList_GetItem(t,0)));
lpi.Frequency = PyInt_AsLong(PyList_GetItem(t, 1));
lpi.Angle = PyInt_AsLong(PyList_GetItem(t, 2));
lpi.SpotFunc = PyInt_AsLong(PyList_GetItem(t, 3));
- pdfOptions.LPISettings[st]=lpi;
+ pdfOptions.LPISettings[st] = lpi;
}
pdfOptions.Articles = self->article;
@@ -1350,9 +1422,7 @@
pdfOptions.UseLPI = self->uselpi;
pdfOptions.UseSpotColors = self->usespot;
pdfOptions.doMultiFile = self->domulti;
- self->version = minmaxi(self->version, PDFOptions::PDFVersion_Min, PDFOptions::PDFVersion_Max);
- // FIXME: Sanity check version
- pdfOptions.Version = (PDFOptions::PDFVersion)self->version;
+
if (self->encrypt)
{
int Perm = -64;
More information about the scribus-commit
mailing list