More v2.7 documentation
This commit is contained in:
parent
277311088f
commit
83c5c4b8ff
BIN
cpdfmanual.pdf
BIN
cpdfmanual.pdf
Binary file not shown.
|
@ -3058,11 +3058,10 @@ given page range.
|
|||
|
||||
\vspace{1.5mm}
|
||||
\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}
|
||||
\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}
|
||||
|
||||
\section{Reading Document Information}
|
||||
|
@ -3413,6 +3412,25 @@ startvalue: 1
|
|||
\end{verbatim}
|
||||
\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}
|
||||
|
||||
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}
|
||||
{\small \begin{framed}
|
||||
|
||||
\small\noindent\verb!cpdf -list-fonts in.pdf!
|
||||
\small\noindent\verb!cpdf -list-fonts[-json] in.pdf!
|
||||
|
||||
\vspace{1.5mm}
|
||||
\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}
|
||||
The \texttt{-list-fonts} operation prints the fonts in the document,
|
||||
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 /F248 /Type1 /Times-Roman /WinAnsiEncoding
|
||||
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 /F452 /Type1 /Times-Roman /WinAnsiEncoding
|
||||
\end{verbatim}
|
||||
\end{framed}
|
||||
\end{framed}}
|
||||
|
||||
\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 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}
|
||||
\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.
|
||||
|
@ -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.
|
||||
|
||||
|
||||
|
||||
|
||||
\section{Copying Fonts}
|
||||
\label{copyfont}
|
||||
|
||||
|
|
Loading…
Reference in New Issue