More v2.7 documentation

This commit is contained in:
John Whitington 2024-01-26 18:19:28 +00:00
parent 277311088f
commit 83c5c4b8ff
2 changed files with 48 additions and 6 deletions

Binary file not shown.

View File

@ -3058,11 +3058,10 @@ given page range.
\vspace{1.5mm} \vspace{1.5mm}
\small\noindent\verb!cpdf -remove-page-labels in.pdf -o out.pdf!\\ \small\noindent\verb!cpdf -remove-page-labels in.pdf -o out.pdf!\\
\small\noindent\verb!cpdf -print-page-labels in.pdf! \small\noindent\verb!cpdf -print-page-labels[-json] in.pdf!
\vspace{1.5mm} \vspace{1.5mm}
\small\noindent\verb!cpdf -composition in.pdf!\\ \small\noindent\verb!cpdf -composition[-json] in.pdf!
\small\noindent\verb!cpdf -composition-json in.pdf!
\end{framed} \end{framed}
\section{Reading Document Information} \section{Reading Document Information}
@ -3413,6 +3412,25 @@ startvalue: 1
\end{verbatim} \end{verbatim}
\end{framed}\pagestyle{empty}\thispagestyle{fancy} \end{framed}\pagestyle{empty}\thispagestyle{fancy}
\noindent Or, in JSON format with \texttt{-print-page-labels-json}:
\begin{framed}\small\begin{verbatim}[
{
"labelstyle": "LowercaseRoman",
"labelprefix": null,
"startpage": 1,
"startvalue": 1
},
{
"labelstyle": "DecimalArabic",
"labelprefix": null,
"startpage": 17,
"startvalue": 1
}
]
\end{verbatim}
\end{framed}\pagestyle{empty}
\section{Composition of a PDF} \section{Composition of a PDF}
The \texttt{-composition} and \texttt{-composition-json} operations show how much space in a PDF is used by each kind of data. Here is the output of \texttt{-composition} for this manual: The \texttt{-composition} and \texttt{-composition-json} operations show how much space in a PDF is used by each kind of data. Here is the output of \texttt{-composition} for this manual:
@ -3681,7 +3699,7 @@ To remove a particular image, find its name using \texttt{-image-resolution} wit
\chapter{Fonts}\pagestyle{fancy}\label{chap:14} \chapter{Fonts}\pagestyle{fancy}\label{chap:14}
{\small \begin{framed} {\small \begin{framed}
\small\noindent\verb!cpdf -list-fonts in.pdf! \small\noindent\verb!cpdf -list-fonts[-json] in.pdf!
\vspace{1.5mm} \vspace{1.5mm}
\noindent\verb!cpdf -print-font-table <font name> -print-font-table-page <n> in.pdf! \noindent\verb!cpdf -print-font-table <font name> -print-font-table-page <n> in.pdf!
@ -3706,7 +3724,7 @@ To remove a particular image, find its name using \texttt{-image-resolution} wit
\label{listingfonts} \label{listingfonts}
The \texttt{-list-fonts} operation prints the fonts in the document, The \texttt{-list-fonts} operation prints the fonts in the document,
one-per-line to standard output. For example: one-per-line to standard output. For example:
\begin{framed}\small\begin{verbatim}1 /F245 /Type0 /Cleargothic-Bold /Identity-H {\small\begin{framed}\small\begin{verbatim}1 /F245 /Type0 /Cleargothic-Bold /Identity-H
1 /F247 /Type0 /ClearGothicSerialLight /Identity-H 1 /F247 /Type0 /ClearGothicSerialLight /Identity-H
1 /F248 /Type1 /Times-Roman /WinAnsiEncoding 1 /F248 /Type1 /Times-Roman /WinAnsiEncoding
1 /F250 /Type0 /Cleargothic-RegularItalic /Identity-H 1 /F250 /Type0 /Cleargothic-RegularItalic /Identity-H
@ -3727,12 +3745,33 @@ one-per-line to standard output. For example:
4 /F451 /Type0 /ClearGothicSerialLight /Identity-H 4 /F451 /Type0 /ClearGothicSerialLight /Identity-H
4 /F452 /Type1 /Times-Roman /WinAnsiEncoding 4 /F452 /Type1 /Times-Roman /WinAnsiEncoding
\end{verbatim} \end{verbatim}
\end{framed} \end{framed}}
\noindent The first column gives the page number, the second the internal unique font \noindent The first column gives the page number, the second the internal unique font
name, the third the type of font (Type1, TrueType etc), the fourth the PDF font name, the third the type of font (Type1, TrueType etc), the fourth the PDF font
name, the fifth the PDF font encoding. name, the fifth the PDF font encoding.
The information is also available in JSON format with \texttt{-list-fonts-json}:
{\small\begin{framed}\small\begin{verbatim}[
{
"page": 1,
"name": "/F47",
"subtype": "/Type1",
"basefont": "/XYPLPB+NimbusSanL-Bold",
"encoding": null
},
{
"page": 1,
"name": "/F50",
"subtype": "/Type1",
"basefont": "/MCBERL+URWPalladioL-Roma",
"encoding": null
}
]
\end{verbatim}
\end{framed}}
\section{Listing characters in a font} \section{Listing characters in a font}
\index{font!print table for} \index{font!print table for}
We can use \texttt{cpdf} to find out which characters are available in a given font, and to print the map between character codes, unicode codepoints, and Adobe glyph names. This is presently a best-effort service, and does not cover all font/encoding types. We can use \texttt{cpdf} to find out which characters are available in a given font, and to print the map between character codes, unicode codepoints, and Adobe glyph names. This is presently a best-effort service, and does not cover all font/encoding types.
@ -3775,6 +3814,9 @@ $ ./cpdf -print-font-table /XYPLPB+NimbusSanL-Bold
\noindent The first column is the character code, the second the Unicode codepoint, the character itself and its Unicode name, and the third the Adobe glyph name. \noindent The first column is the character code, the second the Unicode codepoint, the character itself and its Unicode name, and the third the Adobe glyph name.
\section{Copying Fonts} \section{Copying Fonts}
\label{copyfont} \label{copyfont}