% \iffalse meta-comment % % File: pdfx.dtx % % Copyright (c) 2019, CV Radhakrishnan , % Han The Thanh , % Ross Moore , % Peter Selinger % % This file may be distributed and/or modified under the conditions % of the LaTeX Project Public License, either version 1.2 of this % license or (at your option) any later version. The latest version % of this license is in: % % http://www.latex-project.org/lppl.txt % % and version 1.2 or later is part of all distributions of LaTeX % version 1999/12/01 or later. % % \fi % % \CheckSum{6802} % \iffalse % %<*driver> \pdfcompresslevel 9 \providecommand{\pdfxopt}{a-2u} \providecommand{\lastyear}{2018} \providecommand{\thisyear}{2024} \begin{filecontents}[force]{./\jobname.xmpdata} \Title{Generation of PDF/X- and PDF/A-compliant PDFs with pdfTeX \textemdash\ pdfx.sty} \Author{\CVR\sep \Thanh\sep Ross Moore\sep Peter Selinger} \Subject{This package supports generation of PDF/X-, PDF/A- and PDF/E-compliant documents, in most of their variants, using pdfLaTeX, LuaLaTeX and XeLaTeX.} \Keywords{PDF/X-, PDF/A- and PDF/E-compliance\sep Multilingual Metadata\sep installation\sep \TeX Live \thisyear} \PublicationType{manual} \Contributor{Norbert Preining: 'colorprofiles' package} \Copyright{Public domain.} \Copyrighted{False} \CopyrightURL{http://tug.org/texlive/} \CoverDisplayDate{July \thisyear} \CoverDate{\thisyear-07-01} \CreatorTool{LaTeX + pdfx.sty with option \pdfxopt, from TeX Live \thisyear} \Date{2024-07-01} \Advisory{An earlier version of this documentation was published as: TUGboat 36, No.2, pp.136\textendash 142 (2015)} \Advisory{v1.6: Added XMP support for PDF/UA-1. Added more Metadata fields and Language support.} \Advisory{v1.6: Default RGB and CMYK profiles now require the colorprofiles.sty package.} \Relation{Requires the colorprofiles package for RGB and CMYK default profiles.} \Advisory{v1.6: Access more profiles, incl. to pdfaPilot's color profile folders.} \Advisory{v1.6: Revised glyphtounicode.sty to use variation selectors.} \Advisory{v1.6: altered maps to PUA codepoints.} \Advisory{v1.6: added more glyphs via glyphtounicode-ntx.tex } \Advisory{v1.6: Support for 8-bit Hebrew encodings, some Arabic and Devanagari.} \Advisory{v1.6: Updated documentation, incl. for LaTeX changes.} \Advisory{v1.6.1: Fixed issue with ifthen package; improved Metadata with LuaTeX and XeTeX.} \Advisory{v1.6.1: Flexibility with page boxes for PDF/X.} \Advisory{v1.6.2: Fixed passing of options to xcolor, and some glyphtounicode values.} \Advisory{v1.6.2: Fixed encoding issue. Extra warning when colorprofiles.tex is missing.} \Advisory{v1.6.3: Properly fixed encoding issue; supports \string\pdfomitcharset\ primitive.} \Advisory{v1.6.3: Reference to veraPDF validation software; additions to glyphtounicode-ntx.tex.} \Advisory{v1.6.3: Patched \string\mathaccentV\ to output accents after the base character.} \Advisory{v1.6.4: Added check and warning with luatex for whether \string\pdfminorversion\ can be changed.} \Advisory{v1.6.4: Ensure correct \string\catcode for input characters up to 31, when reading .xmpdata file.} \Advisory{v1.6.4: Disabled patched \string\mathaccentV\ due to incompatibility with wide base expressions.} \Advisory{v1.6.5: Support for \string\Nickname\ as Metadata command.} \Advisory{v1.6.5: Ensure par is unexpandable when reading Metadata.} \Advisory{v1.6.5a: Support for Memoir class's \string\stockwidth\ and \string\stockheight.} \Advisory{v1.6.5a: Added pdf20 option for PDF 2.0, with support for \string\pdfmajorversion.} \Advisory{v1.6.5b: Avoid loading xmpincl package from within a TeX grouping.} \Advisory{v1.6.5c: Avoid loading stringenc package from within a TeX grouping.} \Advisory{v1.6.5d: Disable some options for xcolor after use.} \Advisory{v1.6.5e: Ensure \string\pdfmajorversion\ and \string\pdfminorversion\ are both defined and set correctly.} \Advisory{v1.6.5e: Updated documentation; added new Bibliography entries and revised URL links.} \Advisory{v1.6.5f: Reset ifpdf properly; support \string\creationdate with XeTeX. Revised Glossary layout.} \pdfxEnableCommands{% \def\CVR{C.V. Radhakrishnan}\def\Thanh{H\`an Th\eee Thanh}% \def\eee{^^c3^^aa^^cc^^81 }} \end{filecontents} \PassOptionsToPackage{dvipsnames,svgnames}{xcolor} \documentclass[a4paper]{ltxdoc} \usepackage[\pdfxopt]{pdfx} \usepackage{rvdtx} \usepackage{graphicx} \usepackage[latin10]{inputenc} \input text89.def \usepackage[T1]{fontenc} \hypersetup{citecolor=blue} \pdfstringdefDisableCommands{\def\thinspace{}} \newcommand{\fixmd}{${}^{\mathrm f}$} \newcommand{\starmd}{${}^{\ast}$} \EnableCrossrefs \CodelineIndex \RecordChanges \begin{document} \DocInput{\jobname.dtx} \PrintChanges \PrintIndex \end{document} % % \fi % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z % Digits \0\1\2\3\4\5\6\7\8\9 % Exclamation \! Double quote \" Hash (number) \# % Dollar \$ Percent \% Ampersand \& % Acute accent \' Left paren \( Right paren \) % Asterisk \* Plus \+ Comma \, % Minus \- Point \. Solidus \/ % Colon \: Semicolon \; Less than \< % Equals \= Greater than \> Question mark \? % Commercial at \@ Left bracket \[ Backslash \\ % Right bracket \] Circumflex \^ Underscore \_ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % % \GetFileInfo{pdfx.dtx} % % \DoNotIndex{\newcommand,\newenvironment} % % \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let} % \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi} % \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup} % \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand} % \DoNotIndex{\space,\@empty,\special,\@nil,\z@,\@@mod} % \DoNotIndex{\\,\@gobble,\@@,\@fornoop,\@fortmp,\@ifundefined,\@firstoftwo,\@secondoftwo} % \DoNotIndex{\@tempcnta,\@tempcntb,\@tempboxa,\ifnot@empty,\@this,\@firstofone} % \DoNotIndex{\{,\},\alph,\bgroup,\dp,\ht,\kern,\egroup} % \DoNotIndex{\do,\end,\HN,\ifcase,\ifnum,\IfFileExists,\ifvmode} % \DoNotIndex{\ignorespaces,\immediate,\input,\item,\jobname} % \DoNotIndex{\leavevmode,\loop,\repeat,\makeatletter,\makeatother} % \DoNotIndex{\meaning,\newcounter,\next,\or,\par,\renewcommand} % \DoNotIndex{\renewcommand,\renewenvironment,\stepcounter} % \DoNotIndex{\Tg,\thepage,\unskip,\write,\advance,\{,\}} % \DoNotIndex{\@ifpackageloaded,\@ifclassloaded,\@pdfcreationdate,\@pdfcreator} % \DoNotIndex{\@pdfmoddate,\AtBeginDocument,\catcode,\DeclareOption} % \DoNotIndex{\endinput,\endlinechar,\errmessage,\everyeof,\futurelet} % \DoNotIndex{\Hy@DisableOption,\Hy@UseMaketitleInfos,\hypersetup} % \DoNotIndex{\inputencoding,\InputIfFileExists,\NeedsTeXFormat} % \DoNotIndex{\newif,\noexpand,\obeyspaces,\PackageError,\PDF@FinishDoc} % \DoNotIndex{\pdfcatalog,\pdfcreationdate,\pdfgeninterwordspace} % \DoNotIndex{\pdfinterwordspace,\pdfinterwordspaceoff,\pdfgentounicode} % \DoNotIndex{\pdfinfo,\pdfinterwordspaceon,\pdflastobj,\pdfmapline} % \DoNotIndex{\pdfmdfivesum,\pdfminorversion,\pdfobj,\pdfobjcompresslevel} % \DoNotIndex{\pdfpageattr,\pdfresetpageorigin,\pdfstringdef} % \DoNotIndex{\pdftexbanner,\ProcessOptions,\ProvidesPackage,\RequirePackage} % \DoNotIndex{\scantokens,\typeout,\vrule,\wd} % % \changes{v1.00}{2008/12/01}{Initial commit to the CVS.} % \changes{v1.01}{2008/12/10}{\texttt{glyphtounicode-cmr.tex} included with the package.} % \changes{v1.3}{2008/12/01}{Fix copyright in \texttt{.xmp} files.} % \changes{v1.5.4}{2015/02/28}{Fixed timezone bug; Unicode support; more % PDF variants; added color profiles.} % \changes{v1.5.5}{2015/03/23}{Support for PDF/X-4p and PDF/X-5pg % with external color profiles.} % \changes{v1.5.6}{2016/02/05}{Suppressed `dummy-space' font warning; % removed spurious `?' in XMP packets; improved handling of Color Profiles; % ensure \texttt{\textbackslash Hy@pdfatrue} when building PDF/A, for link flags; % properly enables \texttt{xcolor} conversion of color models.} % \changes{v1.5.7}{2016/02/17}{Removed UTF-8 characters that appear in % the documentation only, within comments in the package source, % but result in a validation failure. Language support in XMP metadata. % Added macros for Windows and Mac system color profile directories.} % \changes{v1.5.8}{2016/05/03}{MediaBox, TrimBox, etc. derived from % the \texttt{\textbackslash paperheight}, \texttt{\textbackslash paperwidth}. % Improved language support, incl. KOI8-R % encoded cyrillics, Armenian OT6, and LGR Greek encoding, incl. polytonic Greek. % All the encodings Latin-1--9 are supported for upper 8-bit characters. % Fixed the quoted file-name problem, evident with Lua\TeX. % Method to generate correct bookmarks with non-active (transliterated) input. % Added support for Xe\LaTeX, improvements with Lua\TeX. Updated documentation.} % \changes{v1.5.82}{2017/05/12}{% % Adjusted to changes in the \LaTeX\ core, affecting macros for composite % commands; incl. \texttt{\textbackslash textsuperscript} and others.}% % \changes{v1.5.83}{2017/05/16}{Improved support for Xe\LaTeX\ and Lua\LaTeX.}% % \changes{v1.5.84}{2017/05/18}{Fully expand options for \texttt{hyperref}. Better support % for extended IPA letters and modifiers. Adjusted release versions and dates.}% % \changes{v1.5.85}{2017/06/23}{Fixed bugs, and fully implemented L8U as % a pseudo-encoding; renamed L8U files into the form \texttt{*-penc.def}.}% % \changes{v1.6}{2018/11/18}{Added XMP support for PDF/UA-1. % Added more Metadata fields and Language support. % Default RGB and CMYK profiles now require the \texttt{colorprofiles.sty} package. % Added file \texttt{CallasColorProfiles.tex}. % Revised \texttt{glyphtounicode.sty} to use variation selectors, altered maps to PUA % codepoints; added more glyphs via \texttt{glyphtounicode-ntx.tex}. % Support for 8-bit Hebrew encodings, some Arabic and Devanagari. % Updated documentation, incl. for \LaTeX\ changes. % }% % \changes{v1.6.1}{2018/12/22}{Fixed issue with \texttt{ifthen} package; % improved Metadata with Lua\TeX\ and Xe\TeX. Flexibility with page boxes for PDF/X.}% % \changes{v1.6.2}{2019/01/04}{Fixed passing of options to \texttt{xcolor}, and some \texttt{glyphtounicode} values.}% % \changes{v1.6.3}{2019/02/27}{Fixed encoding issues; support for new \texttt{\textbackslash pdfomitcharset} primitive; % reference to \textsf{veraPDF} validation software; additions to \texttt{glyphtounicode-ntx.tex}.}% % \changes{v1.6.4}{2019/09/26}{Added check and warning with \texttt{luatex} for whether \texttt{\textbackslash pdfminorversion} can be changed; % ensure correct \texttt{\textbackslash catcode} for input characters up to 31, when reading \texttt{.xmpdata} file; % disabled patched \texttt{\textbackslash mathaccentV} due to incompatibility with wide base expressions.} % \changes{v1.6.5}{2021/07/06}{Support for \texttt{\textbackslash Nickname} as Metadata command; % ensure \texttt{\textbackslash par} is unexpandable when processing XMP metadata.} % \changes{v1.6.5a}{2023/10/17}{Added option \texttt{pdf20} for future need with PDF 2.0; support for \texttt{\textbackslash pdfmajorversion}; % support for Memoir's \texttt{\textbackslash stockwidth} and \texttt{\textbackslash stockheight} dimen registers.} % \changes{v1.6.5b}{2024/04/05}{Avoid loading \texttt{xmpincl} package from within a \TeX\ grouping.} % \changes{v1.6.5c}{2024/05/23}{Avoid loading \texttt{stringenc} package from within a \TeX\ grouping.} % \changes{v1.6.5d}{2024/05/29}{Adjust for non-zero \texttt{\textbackslash stockwidth} only; prevent changes to \texttt{xcolor} options after use.} % \changes{v1.6.5e}{2024/06/22}{Ensure \texttt{\textbackslash pdfmajorversion} and \texttt{\textbackslash pdfminorversion} % are both defined and set correctly. Updated documentation; added new Bibliography entries and revised URL links.} % \changes{v1.6.5f}{2024/06/24}{Reset \texttt{\textbackslash ifpdf} properly; support \texttt{\textbackslash creationdate} with Xe\TeX. Revised Glossary layout.} % \title{Generation of PDF/X- and PDF/A-\penalty-200 compliant PDFs with \pdftex --- \texttt{pdfx.sty}} % \date{2024/07/01} % \version{1.6.5f} % \keywords{PDF, PDF/A, PDF/X, pdf\TeX, \LaTeX, Multilingual Metadata} % \author{C.\,V.\,Radhakrishnan, \Thanh, Ross Moore {\upshape\small % and} Peter Selinger} % \contact{\texttt{[cvr,thanh]@river-valley.org},\\% % \texttt{ozross@icloud.com}, \texttt{selinger@mathstat.dal.ca}\hss} % % \maketitle % % \StopEventually{} % % \section[Introduction]{Introduction} % % This package\footnote{An earlier version of this documentation % was published as \cite{pdfx}. All the changes since then have been developed % and coded by the 3rd-listed author.} % currently supports generation of PDF/X-, PDF/A- and PDF/E-compliant % documents, using \pdftex, in most of their variants; % see the complete list in Section~\ref{ssec-options} below. % As of \TeX\,Live 2016 it now also works with Lua\LaTeX\ and Xe\LaTeX, % when using appropriate command-line options\footnote{% % The required invocation is:\quad % |xelatex --shell-escape -output-driver="xdvipdfmx -z 0" .tex |}, but % with some limitations --- see Sections~\ref{sssec-xetex} and \ref{sssec-luatex}. % By `supports', we mean that the package provides correct and sufficient % means to declare that a document conforms with a stated PDF variant % (PDF/X, PDF/A, PDF/E, PDF/VT, PDF/UA, etc.) along with the version and/or % level of conformance. % This package also allows appropriate Metadata and Color Profile % to be specified, according to the requirements of the PDF variant. % % Metadata elements, most of which must ultimately be written as XML % using the UTF-8 encoding, is provided via a file named |\jobname.xmpdata|, % for the running \LaTeX\ job. Without such a file, providing some required % information as well as a large range of optional data, a fully validating % PDF file cannot be achieved. The PDF can be created, having the correct % visual appearance on all pages, but it will not pass validation checks. % Sections~\ref{ssec-metadata} and \ref{ssec-multi} describe % how this file should be constructed. % % \medskip % What this package \emph{does not do} is to check for all the details % of document structure and type of content that may be required % (or restricted) within a PDF variant. For example, PDF/VT \cite{PDFVT} requires % well-structured parts, using Form XObject sections tagged as `/DPart'. % Similarly PDF/A-1a (and 2a and 3a) \cite{PDFA,PDFA2,PDFA3} require % a fully `Tagged PDF', including a detailed structure tagging which % envelops the complete contents of the document, as does also PDF/UA \cite{PDF-UA}. % This is beyond the current version of \LaTeX\ engines as commonly shipped; % though see Section~\ref{sec-pdf20} for recent developments. % So while this package provides enough to meet the declaration, % Metadata and font-handling aspects for these PDF/A variants, % it is not sufficient to produce fully-conforming PDFs. % However, with extra \pdftex-based software or macro coding that \emph{is} capable % of producing `Tagged PDF', this package can be used as part of % the overall workflow to produce fully-conforming documents; see \cite{tpdf}. % % % \subsection{PDF standards}\label{ssec-standards} % % PDF/X and PDF/A are umbrella terms used to denote several ISO % standards \cite{PDFX,PDFX3,PDFX1a,PDFX4,PDFX5,PDFA,PDFA2,PDFA3} % that define different subsets of the PDF standard \cite{PDF17,ISO32000}. % The objective of PDF/X is to facilitate graphics exchange between % document creator and printer and therefore, has all requirements % related to printing. For instance, in PDF/X, all fonts need to be % embedded and all images need to be CMYK or spot colors. PDF/X-2 and % PDF/X-3 accept calibrated RGB and CIELAB colors along with all other % specifications of PDF/X. % Since 2005 other variants of PDF/X have emerged, as extra effects % (such as layering and transparency) have been supported within the PDF % standard itself. The full range of versions and conformance supported % in this package is discussed below in Section~\ref{ssec-options}. % % PDF/A defines a profile for archiving PDF documents, which ensures % the documents can be reproduced in the exact same way in years to % come. A key element to achieving this is that PDF/A documents % are 100\% self-contained. All the information needed to display the % document in the same manner every time is embedded in the file. % A PDF/A document is not permitted to be reliant on information from % external sources. Other restrictions include avoidance of % audio/video content, JavaScript and encryption. % Mandatory inclusion of fonts, color profile and standards-based metadata % are absolutely essential for PDF/A. % Later versions allow for use of image compression and file attachments. % % PDF/E is an ISO standard \cite{PDFE} intended for documents used in engineering workflows. % PDF/VT \cite{PDFVT} allows for high-volume customised form printing, such as utility bills. % PDF/UA (`Universal Accessibility') has emerged as a standard \cite{PDF-UA,PDFUA1,PDFUABSI} % supporting Assistive Technologies, incorporating web-accessibility guidelines (WCAG) % for electronic documents. % In future, PDF/H may emerge for health records and medical-related % documents. Other applications can be envisaged. % Declarations and Metadata are supported for the first three of these. % The others are the subject of further work; revised versions of this % package can be expected in later years. % % More complete descriptions of these standards and their usage can be % found on Wikipedia pages~\cite{wikiPDF}. These pages also include % comprehensive links to web resources, guides, commentaries, discussions % and whatever else is relevant to how the standards have been established % and how they can be used. % % \subsection{Later \LaTeX\ changes, support for newer PDF standards}\label{sec-pdf20} % % Although PDF 2.0~\cite{PDF20} was first published in 2017 and revised in 2020, it has taken % a long time for it to become a target format for documents built using \LaTeX. % This is because the requirement of using `Tagged PDF' is stringent, requiring % a reworking of almost every aspect of \LaTeX's document production model \cite{LaTeXPDF}. % Work to this end is going on, via the PDF Association's `\LaTeX\ Project LWG'\cite{PDF-LaTeX}, % the experimental |tagpdf| package \cite{tagpdf}, and Ross Moore's |tpdf| package and macro suite \cite{tpdf}. % Significant internal changes have been made to \LaTeX\ itself, which in turn have % required the |v1.6.5x| updates in 2024 to this |pdfx| package. We thank the following users for reporting % issues arising from such changes: Sergio Zenoni, Takehiko Tanabe, Tom\'a\v s Nov\'a\v cek. % % In early 2024 the PDF Association published several documents for new and updated standards % based upon PDF 2.0~\cite{PDF20}. These include PDF/UA-2 \cite{PDFUA2}, PDF `Declarations' \cite{PDFDecl}, % `Well-Tagged PDF' (WTPDF) \cite{WTPDF} with declarations for `Accessibility' and `Reuse', % adding to PDF/A-4 \cite{PDFA4}, PDF/X-6 \cite{PDFX6} and PDF/VT-3 \cite{PDFVT3}, each with various flavours. % To support these, there will be released in late 2024 a variant named |pdfx2| as an extension of |pdfx|, % with separate documentation detailing how to specify appropriate XMP metadata \cite{XMP-ISO}. % % Once |pdfx2| becomes available, this will take on the role of handling new developments for % \LaTeX\ support of PDF 2.0-based software solutions. The |pdfx| package will remain under % active development, primarily to ensure compatibility of existing documents with PDF 1.7-based % requirements (tagged or otherwise), following any further changes in \LaTeX\ or other packages. % % \section[Usage]{Usage}\label{sec-usage} % % The package can be loaded with the command: % \begin{decl} % \defmacro{usepackage}|[