Difference between revisions of "PDF/A (LaTeX)"

From Wiki
Jump to navigation Jump to search
(Created page with "Generating valid PDF/A documents with LaTeX is quiet a challange and depends heavily on the distribution (TexLive, MikTeX, ...) and the compiler (pdflatex, xelatex, lualatex)....")
 
Line 1: Line 1:
 
Generating valid PDF/A documents with LaTeX is quiet a challange and depends heavily on the distribution (TexLive, MikTeX, ...) and the compiler (pdflatex, xelatex, lualatex).
 
Generating valid PDF/A documents with LaTeX is quiet a challange and depends heavily on the distribution (TexLive, MikTeX, ...) and the compiler (pdflatex, xelatex, lualatex).
 +
 +
[[Category:LaTeX]]
 +
 +
Generating a valid PDF/A document with LaTeX is quiet a journey. The success depends on your distribution (TexLive, MikTeX, ...) and your compiler (pdflatex, lualatex, xelatex). Here are some notes to make your live a bit easier.
  
 
= Possiblilty 1: Ghostscript =
 
= Possiblilty 1: Ghostscript =
 +
 +
The easiest way is to compile your LaTeX document normally and than rework it with [https://www.ghostscript.com/ Ghostscript].
  
 
<syntaxhighlight lang="shell">
 
<syntaxhighlight lang="shell">
Line 24: Line 30:
 
   /DOCINFO pdfmark
 
   /DOCINFO pdfmark
 
</pre>
 
</pre>
 
  
 
= Possibility 2: pdfx =
 
= Possibility 2: pdfx =

Revision as of 15:36, 14 August 2021

Generating valid PDF/A documents with LaTeX is quiet a challange and depends heavily on the distribution (TexLive, MikTeX, ...) and the compiler (pdflatex, xelatex, lualatex).

Generating a valid PDF/A document with LaTeX is quiet a journey. The success depends on your distribution (TexLive, MikTeX, ...) and your compiler (pdflatex, lualatex, xelatex). Here are some notes to make your live a bit easier.

Possiblilty 1: Ghostscript

The easiest way is to compile your LaTeX document normally and than rework it with Ghostscript.

gswin64c -q -dNOSAFER -dPDFA=3 -dBATCH -dNOPAUSE -dNOOUTERSAVE -dPDFSETTINGS=/prepress `
    -sColorConversionStrategy=RGB `
    -sProcessColorModel=DeviceRGB `
    -sDEVICE=pdfwrite `
    -dPDFACompatibilityPolicy=1 `
    -sOutputFile="thesis-a.pdf" "PDFA_def.ps" "thesis.pdf" "pdfmarks.txt"

The file pdfmarks.txt for the metadata:

[ /Title (Document title)
  /Author (Author name)
  /Subject (Subject description)
  /Keywords (comma, separated, keywords)
  /ModDate (D:20210814112233)
  /CreationDate (D:20210814112233)
  /Creator (application name or creator note)
  /Producer (PDF producer name or note)
  /DOCINFO pdfmark

Possibility 2: pdfx

Possibility 3: hyperref & hyperxmp