PDF/A

From Wiki
Jump to navigation Jump to search

Using mkiv one can create PDF/A compliant outputs. The format PDF/A, where A stands for Archive, is a format supposed to be sustainable for archiving purposes (see http://en.wikipedia.org/?title=PDF/A). See also a paper by Luigi Scarso on the issue of creating PDF/A file with mkiv: http://www.ntg.nl/maps/41/08.pdf.

A complete list of PDF formats which can be created can be found in lpdf-fmt.lua.

In ConTeXt mkiv, in order to create such a compliant PDF/A file, one can do as follows: first install (or check that they are present) the following color profiles files

default_cmyk.icc
default_gray.icc
default_rgb.icc
ISOcoated_v2_300_eci.icc

into

tex/texmf-context/colors/icc/profiles

of your Context standalone directory. The default_*.icc files are part of ghostscript and the file ISOcoated_v2_300_eci.icc can be found at: http://www.eci.org/en/downloads.

Next add the following commands at the top of your file:

\setupinteraction
  [title=TITLE,
   subtitle=SUBTITLE,
   author=AUTHOR,
   keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}]

%% For PDF/A
\setupbackend[
format={pdf/a-1b:2005}, % or pdf/a-1a:2005
profile={default_cmyk.icc,default_rgb.icc,default_gray.icc},
intent=ISO coated v2 300\letterpercent\space (ECI)]

%% Tagged PDF
%% method=auto ==> default tags by Adobe
\setupbackend[export=yes]
\setupstructure[state=start,method=auto]

and typeset your file as usual: you'll get a PDF file which is compliant with the requirements of PDF/A-1a or PDF/A-1b, according to what you have chosen to do.

A short example is:

\setupinteraction
  [title=TITLE,
   subtitle=SUBTITLE,
   author=AUTHOR,
   keyword={{KEYWORD1, KEYWORD2}, KEYWORD3}]

%% For PDF/A
\setupbackend[
format={pdf/a-1b:2005}, % or pdf/a-1a:2005
profile={default_cmyk.icc,default_rgb.icc,default_gray.icc},
intent=ISO coated v2 300\letterpercent\space (ECI)]

%% Tagged PDF
%% method=auto ==> default tags by Adobe
\setupbackend[export=yes]
\setupstructure[state=start,method=auto]

\starttext

\chapter[chap:testing]{Testing}

\input knuth

\input tufte

\input knuth

\placefigure[middle][fig:foo]
  {This is an image}
  {\externalfigure[cow.jpg]}

\input tufte

\input knuth

\input tufte

\stoptext

Beware: when figures and other PDF files are included into your file (for instance here cow.jpg) those files may create difficulties for PDF/A compliance, and sometimes they have to be treated separately.