11

I am trying to get a PDF/X-1a compliant PDF for sending the pdf to Lightning Source for publishing books.

I searched and found the following post and tested it

PDF/A with hyperref on TeX Live 2013

And ran the following code in TexStudio

% ===============================
% Filename: test.tex

\documentclass{article}

% ===============================
% Embedding the color profile.
% Requires eciRGB_v2.icc in the working directory
% http://www.eci.org/_media/downloads/icc_profiles_from_eci/ecirgbv20.zip


\pdfminorversion 4
\immediate\pdfobj stream attr{/N 3}  file{eciRGB_v2.icc}
\pdfcatalog{%
/OutputIntents [ <<
/Type /OutputIntent
/S/GTS_PDFA1
/DestOutputProfile \the\pdflastobj\space 0 R
/OutputConditionIdentifier (eciRGB v2)
/Info(eciRGB v2)
>> ]
}

\usepackage{xcolor}
\usepackage{hyperxmp}
\usepackage[pdftex, pdfa, linktoc=none]{hyperref}

% ----------------------------------------------
% Add metadata

\hypersetup{%
   pdftitle={Title},
   pdfauthor={Author},
   pdfauthortitle={Title of the Author},
   pdfcopyright={Copyright (C) 20xx, Copyrightholder},
   pdfsubject={Something},
   pdfkeywords={Keyword1, Keyword2},
   pdflicenseurl={http://creativecommons.org/licenses/by-nc-nd/3.0/},
   pdfcaptionwriter={Scott Pakin},
   pdfcontactaddress={Street},
   pdfcontactcity={City},
   pdfcontactpostcode={101},
   pdfcontactcountry={Country},
   pdfcontactemail={email@institute.edu},
   pdfcontacturl={http://www.institute.edu},
   pdflang={en},
   bookmarksopen=true,
   bookmarksopenlevel=3,
   hypertexnames=false,
   linktocpage=true,
   plainpages=false,
   breaklinks
 }

\begin{document}
What cat says? \label{meow}
See question on page \pageref{meow}.
\end{document}

Then ran the Preflight in Adobe Acrobat Pro XI, for PDF/A-1b varification, it came out with no problems.

how changes do we have to make it to work with PDF/X-1a and PDF/X-3?

Is there a way to get PDF/X-1a fully compliant pdf with PDFLaTex or XeLateX or LuaLaTeX?

1
  • 1
    If you have access to Adobe Acrobat Pro, you can run "preflight" and fix your PDF right there...
    – DG'
    May 5, 2015 at 19:03

1 Answer 1

12

Update: Since the original answer, the PDF api in luatex changed. In order to use this code you have to load luatex85

This should do the trick for PDF/X-1a (you need ISOcoated_v2_300_eci.icc in the current directory):

% ===============================
% Filename: test.tex

\documentclass{article}

% ===============================
% Embedding the color profile.
% Requires ISOcoated_v2_300_eci.icc in the working directory
% http://www.eci.org/_media/downloads/icc_profiles_from_eci/eci_offset_2009.zip

\usepackage{luatex85}
\pdfpageattr{/MediaBox[0 0 595 793]
             /BleedBox[0 0 595 793]
             /TrimBox[25 20 570 773]}

\immediate\pdfobj stream attr{/N 4} file{ISOcoated_v2_300_eci.icc}
\pdfcatalog{%
/OutputIntents [ <<
/Type /OutputIntent
/S/GTS_PDFX
/DestOutputProfile \the\pdflastobj\space 0 R
/OutputConditionIdentifier (ISO Coated v2 300 (ECI))
/Info(ISO Coated v2 300 (ECI))
/RegistryName (http://www.color.org/)
>> ]
}
\pdfinfo{% not needed with newer PDF/X versions
/GTS_PDFXVersion (PDF/X-1:2001)%
/GTS_PDFXConformance (PDF/X-1a:2001)%
}

\usepackage[cmyk]{xcolor}
\usepackage{hyperxmp}
\usepackage{hyperref}

\hypersetup{%
    pdfxstandard=PDF/X-1a:2001,
    pdfstartpage={}
}

\title{Title}

\begin{document}
\begin{NoHyper}
What cat says? \label{meow}
See question on page \pageref{meow}.
\end{NoHyper}
\end{document}

Works with pdflatex and lualatex but not xelatex.

21
  • 1
    One more question, how did you find out the above commands would work for pdf/x-1a complaince ? Is there any site which gives such information.
    – Ibn Saeed
    May 6, 2015 at 4:36
  • 1
    With luatex you can use any font you want.
    – DG'
    May 6, 2015 at 6:59
  • 1
    @gsl the site tests PDF/A compliance, not PDF/X. For PDF/A use this code: tex.stackexchange.com/a/136653/29873
    – DG'
    May 19, 2015 at 12:23
  • 2
    @DG': Wonderful. I just tested you answer using Acrobat Pro 11, and it works flowlessly. Until now, we had to keep a windows laptop around just for this, now we can go full FreeBSD. Thanks!
    – gsl
    May 19, 2015 at 16:40
  • 2
    concerning xetex, this question might help Nov 18, 2015 at 9:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .