summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/pdftex/pdftex-pdfkeys/pdftex-pdfkeys.tex
blob: 246b4329318ce3684f4da2c0a669f359afa346dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
% $Id: //depot/Master/texmf-dist/doc/pdftex/base/pdftex-pdfkeys/pdftex-pdfkeys.tex#1 $
%      Copyright (c)  2001 Martin Schröder
%      Permission is granted to copy, distribute and/or modify this document
%      under the terms of the GNU Free Documentation License, Version 1.1 or
%      any later version published by the Free Software Foundation; with with
%      no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
%      Texts.
%      A copy of the license is included in the appendix entitled "GNU Free
%      Documentation License".
%
% The layout of this document tries to mimic that of the PDF reference.
\pdfoutput=1
\pdfcompresslevel=9
\pdfdecimaldigits=5
\documentclass[a4paper,oneside,bibtotoc,openany,pdftex]{scrbook}
\usepackage[latin1]{inputenc}
\usepackage[pdfpagelabels]{hyperref}
\usepackage{thumbpdf}
\usepackage{filecontents}
\usepackage{ltxtable,booktabs}
\usepackage{xspace}
\usepackage{relsize}
\usepackage{prelim2e}
\newcommand{\documentversion}{0.12}
\renewcommand{\PrelimText}{%
   \textnormal{%
      \footnotesize%
      \PrelimTextStyle%
      Version \documentversion{} -- 2002-05-10
      }%
   }

%--------------

\hypersetup{colorlinks,
    bookmarksnumbered,
    pdftitle={Additional PDF keys inserted by pdfTeX},
    pdfauthor={Martin Schröder}}

\newenvironment{keytable}[1]
% Usage:
% \begin{filecontents}{foo}
% \begin{keytable}{caption}
% \pdfkey...
% \end{keytable}
% \end{filecontents}
% \LTXtable{\textwidth}{foo}
    {%
    \begin{longtable}{ll>{\raggedright}X}
    \caption{#1}\belowpdfbookmark{Table \thetable{} #1}{table:\thetable}\\
    \toprule
    \sffamily\slshape Key & \sffamily\slshape Type & \sffamily\slshape Semantics \tabularnewline
    \midrule\addlinespace[1ex]
    \endfirsthead
    \caption[]{(continued)}\\
    \toprule
    \sffamily\slshape Key & \sffamily\slshape Type & \sffamily\slshape Semantics \tabularnewline
    \midrule\addlinespace[1ex]
    \endhead
    \bottomrule
    \endfoot
    }{\end{longtable}%
    }
\newcommand*{\pdfkey}[3]{\bfseries #1 & #2 & #3\tabularnewline}

\newenvironment{history}
    {%
    \begin{longtable}{lll>{\raggedright}X}
    \caption{History}\belowpdfbookmark{Table \thetable{} History}{table:\thetable}\\
    \toprule
    Version & When & Who & What \tabularnewline
    \midrule\addlinespace[1ex]
    \endfirsthead
    \caption[]{(continued)}\\
    \toprule
    Version & When & Who & What \tabularnewline
    \midrule\addlinespace[1ex]
    \endhead
    \bottomrule
    \endfoot
    }{\end{longtable}%
    }
\newcommand*{\historyentry}[4]{#1 & #2 & #3 & #4\tabularnewline}

%--------------

\deffootnote{1em}{1em}{\textsuperscript{\normalfont{\thefootnotemark}}}

%--------------

\newcommand{\pt}{pdf\TeX\xspace}
\newcommand{\eg}{e.\,g.\xspace}
\newcommand*{\key}[1]{\textsf{\textbf{#1}}\xspace}

%--------------
\begin{document}
\frontmatter
\title{Additional PDF keys inserted by \pt\\[1ex]
       \relsize{-2} Version \documentversion}
\author{Martin Schröder%
     \thanks{ArtCom GmbH\newline
             Grazer Straße 8\newline
             28359 Bremen\newline
             Germany\newline
             \texttt{ms@artcom-gmbh.de}}
     }
\maketitle

\tableofcontents
\listoftables

%--------------

\chapter*{Copyright}

Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.1 or any later version
published by the Free Software Foundation; with no Invariant Sections, with no
Front-Cover Texts, and with no Back-Cover Texts.
A copy of the license is included in appendix \ref{chap:fdl}.

%--------------
\mainmatter
\chapter{Introduction}

A PDF document should contain only the structures and attributes defined in
the PDF specification \cite{Adobe:2001:PRA}. 
But the specification allows applications to insert additional keys,
provided they follow certain rules \cite[Appendix F]{Adobe:2001:PRA}.

The most important rule is that developers have to register with Adobe prefixes
for the keys they want to insert. 
This has been done for \pt: Hans Hagen has registered the prefix ``PTEX''.

As this prefix is all caps keys should start with an additional ``.''. 

\section{History}
\begin{filecontents}{ltxtable.inc}
\begin{history}
\historyentry{0.12}
             {2002-05-10}
             {Martin Schr\"oder}
             {Fixed typo in Copyright; refer to \cite{Adobe:2001:PRA}
             instead of \cite{Adobe:2000:PRA} and updated the terminology.}
\historyentry{0.11}
             {2001-11-05}
             {Martin Schr\"oder}
             {Added \key{PTEX.InfoDict}}
\historyentry{0.1}
             {2001-10-10}
             {Martin Schr\"oder}
             {Initial version}
\end{history}
\end{filecontents}
\LTXtable{\textwidth}{ltxtable.inc}

%--------------
\chapter{XObjects (included PDF)}

\pt generates an XObject for every included PDF.
The dictionary of this object contains these additional keys:

\begin{filecontents}{ltxtable.inc}
\begin{keytable}{Attributes in XObjects of included PDF}
\pdfkey{PTEX.FileName}{string}{The name of the included file as seen by \pt.}
\pdfkey{PTEX.InfoDict}{dictionary}{\emph{(Indirect)} The document
                                  information dictionary of the included
                                  PDF.}
\pdfkey{PTEX.PageNumber}{integer}{The page number of the included file.}
\end{keytable}
\end{filecontents}
\LTXtable{\textwidth}{ltxtable.inc}

%--------------
\chapter{Document Catalog}

Although it would seem more natural to put this infomation in the document
information dictionary, the PDF reference says
\cite[p.\,575]{Adobe:2001:PRA}: 
\begin{quote}
Although viewer applications can store custom metadata in the document
information dictionary, it is inappropriate to store private content or
structural information there; such information should be stored in the
document catalog instead (see Section 3.6.1, Document Catalog).
\end{quote}

\begin{filecontents}{ltxtable.inc}
\begin{keytable}{Catalog attributes}
\pdfkey{PTEX.Fullbanner}{string}{The full version of the \pt binary that
                                 produced the file as displayed by
                                 \texttt{pdftex -\/-version}, \eg\ ``This is
                                 pdfTeX, Version
                                 3.14159-1.00a-pretest-ArtCom-20011008''.\newline
                                 This is necessary because the string in the
                                 \key{Producer} key in the Info dictionary
                                 is rather short, \eg\ ``pdfTeX-1.0a-pdfcrypt''.} 
\end{keytable}
\end{filecontents}
\LTXtable{\textwidth}{ltxtable.inc}

%--------------
\appendix
\include{fdl}

%--------------
\backmatter
\bibliographystyle{plain}
\bibliography{postscri}

\end{document}