Infothek

Convert plain PDF to PDF/A-3 with Ghostscript

veröffentlicht von usegroup am 16.01.2025

Themen: Grundlagen, Integration, Werkzeuge
Branche: Branchenunabhängig
Dokumentenart: Fachartikel

To convert a plain PDF to PDF/A-3 using the open source software Ghostscript the following steps can be attempted. A good place to ask questions may be the Ghostscript- Mailing List. 
First you need a suitable color definition file like  https://github.com/saucecontrol/Compact-ICC-Profiles/blob/master/profiles/AdobeCompat-v2.icc
Please copy that into your Ghostscript/Resource directory.
Afterwards you have to link it in the file PDFA_def.ps in your lib-directory. 
Under MS Windows this should happen with double backslashes and if possible without drive letter like 
/ICCProfile (\\gs10031w64\\Resource\\AdobeCompat-v2.icc)
When you invoke Ghostscript you will have to explicitly allow read access to that directory by specifying it's absolute path (usually with single backslashes, and with an additional backslash at the end) in the  sGenericResourceDir-parameter. The whole command and it's output may then look like this:


gs10031w64\bin\gswin64c.exe -P -dPDFA=1 -dCompressStreams=false -sGenericResourceDir=\gs10031w64\Resource\ -sColorConversionStrategy=RGB -sDEVICE=pdfwrite -dRenderIntent=1 -dPDFACompatibilityPolicy=3 -o name_ausgabedatei.pdf gs10031w64\lib\PDFA_def.ps name_eingabedatei.pdf

GPL Ghostscript 10.04.0 (2024-09-18)
Copyright (C) 2024 Artifex Software, Inc. All rights reserved.
This software is supplied under the GNU AGPLv3 and comes with NO WARRANTY:
see the file COPYING for details.
Processing pages 1 through 1.
Page 1

A corrupt or invalid mention of the icc file, or a missing file, may cause error message like this:
WARNING: 
----
Failed to open the supplied ICCProfile for reading. This may be due to
an incorrect filename or a failure to add --permit-file-read=
to the command line. This PostScript program needs to open the file
and you must explicitly grant it permission to do so.

PDF/A processing aborted, output may not be a PDF/A file.
----
Ghostscript can also be used to embed the XML, but this is quite komplex.

After the conversion please confirm the generated file is a valid PDF/A file using a validator like  https://verapdf.org/ .


Möchtest Du Dich wirklich abmelden?

Abbrechen Jetzt abmelden


Diese Funktion steht nur registrierten Nutzer zur Verfügung.
Bitte registrieren Sie sich kostenlos hier.

OK


OK


Datenschutzhinweis
Schön, dass Sie unser Onlinetool zur Erstellung von E-Rechnungen benutzen! Zu Ihrer eigenen Sicherheit weisen wir darauf hin, dass Ihre Daten einzig und allein für den gewünschten Verarbeitungsprozess der Rechnungserstellung genutzt werden. Weder die eingegebenen Formulardaten noch das erzeugte PDF-Dokument werden bei uns gespeichert. Sobald Sie Ihren Web-Browser schließen bzw. eine andere Webseite aufrufen, werden alle Daten gelöscht. Im übrigen verweisen wir ergänzend auf unsere Datenschutzbestimmungen.

Viele Grüße wünscht
das Team der ZUGFeRD Community



Rechnung erstellen Abbrechen
Eintrag wirklich löschen?



Löschen Abbrechen