3

I'm trying to create a PDF that is PDF/A- and PDF/X-compliant at the same time with LuaLaTeX and documentclass scrbook in different flavors.

So far, I found some working code. This MWE helped me produce PDFs that are compliant with PDF/A-2b or PDF/A-2u and PDF/X-4 at the same time. Though I would also like to be able to switch to PDF/X-1a and PDF/X-3, which works with snippets of this code.

This is the MWE I stitched together so far. I'm not sure what all the parts do, so I'm happy for any explanation or correction of faulty or unneeded parts. It produces a PDF compliant with PDF/A-2u (or b) and PDF/X-4 at the same time, or alternately with only a few lines of code changed with PDF/A-2u (or b) and PDF/X-1a (or 3). However, this only works with documentclass article. My question: How do I get this to work with documentclass scrbook? When using scrbook it's not compliant anymore with PDF/X. Acrobat DC warns that "Document contains actions". How do I get rid of them? I already set bookmarks to false and use NoHyper.

To get this MWE to work, you also need PSO_Uncoated_ISO12647_eci.icc from eci_offset_2009.zip from here. To switch between PDF/A and PDF/X variants, please have a look at the comments I made right before \begin{document}.

Edit: So I got the solution. See my comment below. Let's turn this into another question instead: Do you think this is a proper way to produce multistandard compliant documents for all these PDF variants (PDF/A-2b, A-2u and X-1a, x-3, X-4)? Are there better ways to do it?

MWE:

% !TeX TXS-program:compile = txs:///lualatex/[-synctex=1 -interaction=nonstopmode] % !BIB TS-program = biber % !TeX encoding = UTF-8 \ifnum\luatexversion>81 \RequirePackage{luatex85} \else \fi \pdfobjcompresslevel=0% \pdfminorversion=3% Setting version of pdf % must be set 3 for PDF 1.3 required by PDF/X \pdfinclusioncopyfonts=1% \documentclass{scrbook} \usepackage[pdfa,bookmarks=false]{hyperref} %bookmarks are incompatible with PDF/X<6 \usepackage[ngerman]{babel} \usepackage{hyperxmp}[2020/06/15] \usepackage[cmyk]{xcolor} \immediate\pdfobj stream attr{/N 4} file{PSO_Uncoated_ISO12647_eci.icc} \pdfcatalog{% /OutputIntents [ << /Type /OutputIntent /S /GTS_PDFX /DestOutputProfile \the\pdflastobj\space 0 R /Info(PSO Uncoated ISO12647 (ECI)) /OutputCondition(Offset printing, according to ISO 12647-2:2004/Amd1, OFCOM, paper type 4 = uncoated white, 115 g/m2, tone value increase curves C (CMY) and D (K)) /OutputConditionIdentifier (Uncoated FOGRA47) /RegistryName(http://www.color.org) >> << /Type /OutputIntent /S /GTS_PDFA1 /DestOutputProfile \the\pdflastobj\space 0 R /Info(PSO Uncoated ISO12647 (ECI)) /OutputCondition(Offset printing, according to ISO 12647-2:2004/Amd1, OFCOM, paper type 4 = uncoated white, 115 g/m2, tone value increase curves C (CMY) and D (K)) /OutputConditionIdentifier (Uncoated FOGRA47) /RegistryName(http://www.color.org) >> ] } \makeatletter % Bugfix of hyperref to produce CMYK links \let\HyColor@HyperrefBorderColor\HyColor@XZeroOneThreeFour \makeatother \makeatletter %we need to tell PDF/X the final format of the paper. This needs adjustment if you want graphics on the page border, called bleeding \@tempdima=0.99626400996264009962\paperwidth \edef\boxwd{\strip@pt\@tempdima} \@tempdima=0.99626400996264009962\paperheight \edef\boxht{\strip@pt\@tempdima} \makeatother \edef\next{% \protect\pdfpageattr{ /TrimBox[0.0 0.0 \boxwd\space \boxht] }% } \next \title{PDF/A-2b dummy document} \author{anonymus} %%%%%%%%%%%%%% Section start % Use this section for PDF/X-1a and 3 compliance. Comment out for PDF/X-4 compliance. \hypersetup{pdfstartpage={}}% disable openaction of hyperref for PDF/X compliance %(mm size * 72)/25.4 = bp size \pdfpageattr{ %fill manually /TrimBox [0 0 210.990 162.086] } \pdfinfo{ %for PDF/X /Title (Word vs. LaTeX) % without this copy of title pdf is not compatible with PDF/X /GTS_PDFXVersion (PDF/X-1:2001) /GTS_PDFXConformance (PDF/X-1a:2001) }% %%%%%%%%%%%%%% Section end \hypersetup{% pdfdisplaydoctitle=true, pdfversionid=1, pdftrapped=False, pdfapart=2, pdfaconformance=U, % Change to "B" for PDF/A-2b compliance only. pdfstartpage={}, % pdfxstandard={PDF/X-4}, % Comment out to switch to PDF/X-1a or 3. Use for PDF/X-4 compliance. urlbordercolor=red } \begin{document} \begin{NoHyper} %comment out to avoid links \tableofcontents \section {Title} Text. \url{http://tex.stackexchange.com/} \end{NoHyper} % comment out to avoid links \end{document} 
14
  • I got it. Using "\documentclass[bookmarkpackage=false]{scrbook}" it works! Commented Apr 5, 2024 at 22:44
  • May I ask what the purpose of complying with these standards is? I'm just curious. There's a lot of work on making PDFs more accessible, but that seems a completely different (and incompatible) goal. Commented Apr 5, 2024 at 23:22
  • 1
    why on earth are you using pdf 1.3 and such an old x-standard? Commented Apr 6, 2024 at 9:08
  • Well, I'd like to only deal with one document, so PDF/X and A in one. PDF/A compliance is for long-time accessibility, PDF/X to comply with what publishers or print shops ask for. And I'm not sure yet what is asked for so I'd like to have options. Though, thanks for the hint, Ulrike, I guess PDF/X-1a is not used anymore. So I'd use PDF 1.4 and PDF/X-3 instead. Commented Apr 6, 2024 at 9:13
  • 1
    yes the question is why pdf 1.3 era standards rather than pdf 1.7 and pdf/A-3 or pdf 2 and pdf/a-4 for example? Commented Apr 6, 2024 at 9:18

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.