OPALE - 10.0 - Utilisation - Conversion PDF vers PDFA/en

Différence entre versions

De MappingDoc
(Mise à jour pour être en accord avec la nouvelle version de la source de la page)
(Page créée avec « ==Remarks== *In *LIST mode, if the conf/authorized_fonts.txt file does not exist, the output PDF will be 0KB * The conf/authorized_fonts.txt file is not included with the... »)
 
(15 révisions intermédiaires par le même utilisateur non affichées)
Ligne 23 : Ligne 23 :
 
The program is then installed in the destination lib as well as the resources in the xxx/mapping/bin and xxx/mapping/conf folders
 
The program is then installed in the destination lib as well as the resources in the xxx/mapping/bin and xxx/mapping/conf folders
  
==Ecran==
+
==Screen==
La commande MAPPDFA contient 5 paramètres différents (En '''gras''' les valeurs par défaut) :
+
The MAPPDFA command has 5 different parameters (In '''bold''' the default values) :
#Infile : Fichier PDF d'entrée
 
#Outfile : Fichier de sortie de la commande
 
#Type : Version du PDFA à générer (PDFA1, '''PDFA2''', PDFA3)
 
#Quality : Taux de compression lors de l'utilisation en mode image pour les polices soumis à licences. ('''*HIGH''', *MEDIUM, *LOW)
 
#Licensed fonts : Gestion des fonts soumis à licences. ('''*NONE''', *ALL, *LIST)
 
##<nowiki>*NONE</nowiki> : Comportement par défaut, si une police a des restriction de licence ghostscript générera une erreur, qui pourra être catché par la config gserror.txt pour passer en mode vectorisé.
 
##<nowiki>*ALL</nowiki> : Dans ce mode on ignore toutes les restrictions de licence, on embarque toute les polices. Ghostscript ne génère aucune erreur
 
##<nowiki>*LIST</nowiki> : Utilisation d’une liste de police défini dans le fichier '''conf/authorized_fonts.txt''' (encodé en ANSI)
 
On ignore les restrictions de licence uniquement pour les polices listées dans ce fichier.
 
Ghostscript continuera de générer des erreurs pour les polices non listées, ce qui rendra le pdf non PDF/A. (corrigeable en passant par le mode vectorisé)
 
  
Le fichier authorized_fonts.txt doit contenir une liste de nom de police, une par ligne.
+
#Infile : Input file
Le nom de la police à renseigner dans ce fichier peut être trouvé en regardant la log (stdout) du MAPPDFA.
+
#Outfile : Output file
 +
#Type : PDFA type (PDFA1, '''PDFA2''', PDFA3)
 +
#Quality : Compression rate when vectorial image mode for the licensed fonts ('''*HIGH''', *MEDIUM, *LOW)
 +
#Licensed fonts : Way to manage licensed fonts ('''*NONE''', *ALL, *LIST)
 +
##<nowiki>*NONE</nowiki> : Default valeur, if a licensed fonts restriction occurs, MAPPDFA will generate an error message, which could be caught by the gserror.txt config file to switch to vectorial mode.
 +
##<nowiki>*ALL</nowiki> : With this mode, all licensed fonts restrictions will be ignore, MAPPDFA will then embbed all the fonts and no error message will occur.
 +
##<nowiki>*LIST</nowiki> : Use a list of defined fonts in the '''conf/authorized_fonts.txt''' file (encoded in ANSI)
 +
We ignore the licensed font restrictions only for the font listed in this file. MAPPDFA will keep generating error messages for the other non listed fonts, which can be caught by the gserror.txt to switch them to vectorial mode.  
  
<u>Exemple</u> :  
+
The authorized_fonts.txt file must contain the list of fonts to be authorised (one per line)
 +
The font names to add can be found looking at the stdout log of MAPPDFA
 +
 
 +
<u>Example</u> :  
  
 
<span style="background-color:black;color:#64ff33;">Warning: CFMZCH+DejaVuSans-Bold cannot be embedded because of licensing restrictions</span>
 
<span style="background-color:black;color:#64ff33;">Warning: CFMZCH+DejaVuSans-Bold cannot be embedded because of licensing restrictions</span>
  
Il faudra ajouter '''CFMZCH+DejaVuSans-Bold''' (ou juste DejaVuSans-Bold dans le fichier conf/authorized_fonts.txt
+
We must add '''CFMZCH+DejaVuSans-Bold''' (Or just DejaVuSans-Bold in the conf/authorized_fonts.txt file)
  
<div class="mw-translate-fuzzy">
 
 
==Settings==
 
==Settings==
 
===Introduction===
 
===Introduction===
From MAPPDFA V1.1.1, it is possible to behave on an error message.
+
MAPPDFA allows to catch the error messages and have a special behaviour in the event of use of '''Licensed fonts''' contained in the input PDF file?
In Version V1.1.1, it is possible to convert the font in vectorial.
+
It will then be possible to vectorialize the font in image (from MAPPDFA V1.1.0) and specifying a compression rate (from MAPPDFA V1.2.0) or also to force the acceptation of all or certain licensed fonts  (from MAPPDFA V1.3.0). All of this of course with a PDF/A as output.
===Details===
 
The list of error messages to catch is in the following file :
 
</div>
 
  
 
===Détails===
 
===Détails===
====Vectorisation des polices====
+
====Fonts vectorialization====
La liste des messages d'erreur/warning pour lesquels on souhaite vectoriser les polices se situe dans le fichier :
+
The Error/Warning messages for which we want to have the fonts vectorized are located in the following file :
  
 
xxx/mapping/conf/gserror.txt
 
xxx/mapping/conf/gserror.txt
  
Voici exemple de contenu :  
+
Example of its content :  
  
 
  cannot be embedded because of licensing restrictions=vectorize_fonts
 
  cannot be embedded because of licensing restrictions=vectorize_fonts
Ligne 66 : Ligne 62 :
  
  
* Si on obtient un message d'erreur content : cannot be embedded because of licensing restrictions  ALORS   on vectorise les polices
+
*If we get a error message : cannot be embedded because of licensing restrictions  THEN   we vectorize in the image the fonts.
* Si on obtient un message d'erreur content : A font missing from the input PDF has been substituted=vectorize_fonts   ALORS   on vectorise les polices
+
*If we get a error message : A font missing from the input PDF has been substituted  THEN   we vectorize in the image the fonts.
  
====Acceptation des polices soumis à licences====
+
====Acceptation of the licensed fonts====
Il est également possible de forcer l'acceptable de MAPPDFA des polices soumis à licences. Pour se faire il faut créer manuellement le fichier '''conf/authorized_fonts.txt'''. MAPPDFA va alors ignorer les restrictions de polices sous licences listées dans ce fichier.
+
It is also possible to force the acceptation of MAPPDFA of the licensed font. To do so, we need to manually create a '''conf/authorized_fonts.txt''' file. MAPPDFA will then ignore the error message of licensed font restriction for the fonts listed in this file. The LICFONTS parameter of the command must be set to *LIST
  
Voici exemple de contenu :  
+
Here is an content example of this file :  
  
 
  CFMZCH+DejaVuSans-Bold<br>
 
  CFMZCH+DejaVuSans-Bold<br>
  
*Si on obtient un message d'erreur content : CFMZCH+DejaVuSans-Bold cannot be embedded because of licensing restrictions  ALORS  on forcera son acceptation et le fichier en sortie sera bien PDF/A.
+
*If we get tge error message : CFMZCH+DejaVuSans-Bold cannot be embedded because of licensing restrictions  THEN we will force its acceptance and the output PDF will be PDF/A compliant.
  
<div class="mw-translate-fuzzy">
 
 
==Utilization==
 
==Utilization==
===Example 1 - Conversion of a simple pdf to  PDFA/1-b===
+
===Example 1 - Conversion of a simple pdf to  PDFA/1-b rejecting all the licensed fonts===
</div>
+
'''Warning''': If there is one or multiple licensed fonts in the input PDF, the output PDF will then not be PDF/A compliant.
  
 
MAPPDFA INFILE('/home/mapping/simple_pdf.pdf') TYPE(*PDFA1) OUTFILE('/home/mapping/pdfa1_pdf.pdf')   
 
MAPPDFA INFILE('/home/mapping/simple_pdf.pdf') TYPE(*PDFA1) OUTFILE('/home/mapping/pdfa1_pdf.pdf')   
  
<div class="mw-translate-fuzzy">
+
===Example 2 - Convert a simple pdf file to a PDF/A2-b accepting all licensed fonts ===
===Example 2 - Convert a simple pdf file to a PDF/A2-b ===
+
'''Warning''': If there is one or multiple licensed fonts in the input PDF, the output PDF will be PDF/A compliant.
</div>
 
  
 
MAPPDFA INFILE('/home/mapping/simple_pdf.pdf') TYPE(*PDFA2) OUTFILE('/home/mapping/pdfa2_pdf.pdf') LICFONTS(*ALL)   
 
MAPPDFA INFILE('/home/mapping/simple_pdf.pdf') TYPE(*PDFA2) OUTFILE('/home/mapping/pdfa2_pdf.pdf') LICFONTS(*ALL)   
  
<div class="mw-translate-fuzzy">
+
===Example 3 - Convert a simple pdf file to a PDF/A3-b accepting just one specfic licensed fonts CFMZCH+DejaVuSans-Bold===
===Example 3 - Convert a simple pdf file to a PDF/A3-b ===
+
<u>Warning</u> : If there are one or multiple fonts other than FMZCH+DejaVuSans-Bold, then the output PDF will come out with vectorial image font if the settings is set as it (Content of gserror.txt file : cannot be embedded because of licensing restrictions=vectorize_fonts)
</div>
+
If this setting is not present, then the output pdf will come out with dots instead of the licensed fonts and the PDF will not be PDF/A compliant.
  
 
MAPPDFA INFILE('/home/mapping/simple_pdf.pdf') TYPE(*PDFA3) OUTFILE('/home/mapping/pdfa3_pdf.pdf') LICFONTS(*LIST)
 
MAPPDFA INFILE('/home/mapping/simple_pdf.pdf') TYPE(*PDFA3) OUTFILE('/home/mapping/pdfa3_pdf.pdf') LICFONTS(*LIST)
  
Il faudra alors avoir le contenu suivant dans le fichier '''conf/authorized_fonts.txt''' :
+
We will then need to have the name of the fonts in the '''conf/authorized_fonts.txt''' file :
 
  CFMZCH+DejaVuSans-Bold
 
  CFMZCH+DejaVuSans-Bold
  
==Remarques==
+
==Remarks==
     
+
*In *LIST mode, if the conf/authorized_fonts.txt file does not exist, the output PDF will be 0KB
*En mode *LIST si le fichier conf/authorized_fonts.txt n’existe pas le fichier pdf de sortie fera 0 ko.
+
* The conf/authorized_fonts.txt file is not included with the setup. If you need, you will need to create it with the ANSI encoding.
*Le fichier conf/authorized_fonts.txt n’est pas fourni dans le setup.
 

Version actuelle datée du 12 mai 2020 à 13:50

Autres langues :
English • ‎français

Introduction

The command MAPPDFA converts a PDF to a PDF/A (Compatible PDF/A-1b, PDF/A-2b, PDF/A-3b)

Prerequistes

This command is not included with the basic installation. A separated install package needed to be installed. When executing MAPPDFA, the MAPPING library must be online. (edtlibl)

It is also recommanded not to have annotations and UTF16BE fonts inside the input PDF.

The libstdc++ library must be installed on the server prior to installing MAPPDFA

Installation

The setup in made of a SAVF containing the resources needed, the program and the MAPPDFA command. it needs to be restored in the QTEMP lib.

RSTOBJ OBJ(*ALL) SAVLIB(QTEMP) DEV(*SAVF) SAVF(QGPL/MAPPDFA) RSTLIB(QTEMP)

Then Execute the install : INSTALL + F4

Library destination : Lib where you will install the prog and command
Mapping Path : IFS mapping path folder (same path as the one defined in your configuration of your Mapping env Example : /home/mapping)


The program is then installed in the destination lib as well as the resources in the xxx/mapping/bin and xxx/mapping/conf folders

Screen

The MAPPDFA command has 5 different parameters (In bold the default values) :

  1. Infile : Input file
  2. Outfile : Output file
  3. Type : PDFA type (PDFA1, PDFA2, PDFA3)
  4. Quality : Compression rate when vectorial image mode for the licensed fonts (*HIGH, *MEDIUM, *LOW)
  5. Licensed fonts : Way to manage licensed fonts (*NONE, *ALL, *LIST)
    1. *NONE : Default valeur, if a licensed fonts restriction occurs, MAPPDFA will generate an error message, which could be caught by the gserror.txt config file to switch to vectorial mode.
    2. *ALL : With this mode, all licensed fonts restrictions will be ignore, MAPPDFA will then embbed all the fonts and no error message will occur.
    3. *LIST : Use a list of defined fonts in the conf/authorized_fonts.txt file (encoded in ANSI)

We ignore the licensed font restrictions only for the font listed in this file. MAPPDFA will keep generating error messages for the other non listed fonts, which can be caught by the gserror.txt to switch them to vectorial mode.

The authorized_fonts.txt file must contain the list of fonts to be authorised (one per line) The font names to add can be found looking at the stdout log of MAPPDFA

Example :

Warning: CFMZCH+DejaVuSans-Bold cannot be embedded because of licensing restrictions

We must add CFMZCH+DejaVuSans-Bold (Or just DejaVuSans-Bold in the conf/authorized_fonts.txt file)

Settings

Introduction

MAPPDFA allows to catch the error messages and have a special behaviour in the event of use of Licensed fonts contained in the input PDF file? It will then be possible to vectorialize the font in image (from MAPPDFA V1.1.0) and specifying a compression rate (from MAPPDFA V1.2.0) or also to force the acceptation of all or certain licensed fonts (from MAPPDFA V1.3.0). All of this of course with a PDF/A as output.

Détails

Fonts vectorialization

The Error/Warning messages for which we want to have the fonts vectorized are located in the following file :

xxx/mapping/conf/gserror.txt

Example of its content :

cannot be embedded because of licensing restrictions=vectorize_fonts
A font missing from the input PDF has been substituted=vectorize_fonts


  • If we get a error message : cannot be embedded because of licensing restrictions THEN we vectorize in the image the fonts.
  • If we get a error message : A font missing from the input PDF has been substituted THEN we vectorize in the image the fonts.

Acceptation of the licensed fonts

It is also possible to force the acceptation of MAPPDFA of the licensed font. To do so, we need to manually create a conf/authorized_fonts.txt file. MAPPDFA will then ignore the error message of licensed font restriction for the fonts listed in this file. The LICFONTS parameter of the command must be set to *LIST

Here is an content example of this file :

CFMZCH+DejaVuSans-Bold
  • If we get tge error message : CFMZCH+DejaVuSans-Bold cannot be embedded because of licensing restrictions THEN we will force its acceptance and the output PDF will be PDF/A compliant.

Utilization

Example 1 - Conversion of a simple pdf to PDFA/1-b rejecting all the licensed fonts

Warning: If there is one or multiple licensed fonts in the input PDF, the output PDF will then not be PDF/A compliant.

MAPPDFA INFILE('/home/mapping/simple_pdf.pdf') TYPE(*PDFA1) OUTFILE('/home/mapping/pdfa1_pdf.pdf')

Example 2 - Convert a simple pdf file to a PDF/A2-b accepting all licensed fonts

Warning: If there is one or multiple licensed fonts in the input PDF, the output PDF will be PDF/A compliant.

MAPPDFA INFILE('/home/mapping/simple_pdf.pdf') TYPE(*PDFA2) OUTFILE('/home/mapping/pdfa2_pdf.pdf') LICFONTS(*ALL)

Example 3 - Convert a simple pdf file to a PDF/A3-b accepting just one specfic licensed fonts CFMZCH+DejaVuSans-Bold

Warning : If there are one or multiple fonts other than FMZCH+DejaVuSans-Bold, then the output PDF will come out with vectorial image font if the settings is set as it (Content of gserror.txt file : cannot be embedded because of licensing restrictions=vectorize_fonts) If this setting is not present, then the output pdf will come out with dots instead of the licensed fonts and the PDF will not be PDF/A compliant.

MAPPDFA INFILE('/home/mapping/simple_pdf.pdf') TYPE(*PDFA3) OUTFILE('/home/mapping/pdfa3_pdf.pdf') LICFONTS(*LIST)

We will then need to have the name of the fonts in the conf/authorized_fonts.txt file :

CFMZCH+DejaVuSans-Bold

Remarks

  • In *LIST mode, if the conf/authorized_fonts.txt file does not exist, the output PDF will be 0KB
  • The conf/authorized_fonts.txt file is not included with the setup. If you need, you will need to create it with the ANSI encoding.