% \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{6309} % \iffalse % %<*driver> \pdfcompresslevel 9 \providecommand{\pdfxopt}{a-2u} \providecommand{\lastyear}{2018} \providecommand{\thisyear}{2019} \begin{filecontents*}{./\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{March \thisyear} \CoverDate{\thisyear-03-10} \CreatorTool{LaTeX + pdfx.sty with option \pdfxopt, from TeX Live \thisyear} \Date{2017-05-18\sep 2017-06-23\sep 2018-11-29\sep 2018-12-22\sep 2019-02-08\sep 2019-03-10} \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{v.1.6.1: Flexibility with page boxes for PDF/X.} \Advisory{v.1.6.2: Fixed passing of options to xcolor, and some glyphtounicode values.} \Advisory{v.1.6.2: Fixed encoding issue. Extra warning when colorprofiles.tex is missing.} \Advisory{v.1.6.3: Properly fixed encoding issue; supports \string\pdfomitcharset\ primitive.} \Advisory{v.1.6.3: Reference to veraPDF validation software; additions to glyphtounicode-ntx.tex.} \Advisory{v.1.6.3: Patched \string\mathaccentV\ to output accents after the base character.} \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,\advance\@nnil,\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}{glyphtounicode-cmr.tex included with the package.} % \changes{v1.3}{2008/12/01}{Fix copyright in 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 Hy@pdfatrue when building PDF/A, for link flags; % properly enables 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 paperheight, 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 LuaTeX. % Method to generate correct bookmarks with non-active (transliterated) input. % Added support for XeLaTeX, improvements with LuaTeX. 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 XeLaTeX and LuaLaTeX.}% % \changes{v1.5.84}{2017/05/18}{Fully expand options for 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 *-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 colorprofiles.sty package. % Added file CallasColorProfiles.tex . % Revised glyphtounicode.sty to use variation selectors, altered maps to PUA % codepoints; added more glyphs via 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 ifthen package; % improved Metadata with LuaTeX and XeTeX. Flexibility with page boxes for PDF/X.}% % \changes{v1.6.2}{2019/01/04}{Fixed passing of options to xcolor, and some glyphtounicode values.}% % \changes{v1.6.3}{2019/02/27}{Fixed encoding issues; support for new pdfomitcharset primitive; % reference to veraPDF validation software; additions to glyphtounicode-ntx.tex.}% % \title{Generation of PDF/X- and PDF/A-\penalty-200 compliant PDFs with \pdftex --- \texttt{pdfx.sty}} % \date{2019/02/27} % \version{1.6.3} % \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{ross.moore@mq.edu.au}, \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 invokation 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. % 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. % % % \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. % % \section[Usage]{Usage}\label{sec-usage} % % The package can be loaded with the command: % \begin{decl} % \defmacro{usepackage}|[