mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-06-05 22:09:39 +02:00
Adds -cm -pt -in and documents
This commit is contained in:
1
Changes
1
Changes
@@ -18,6 +18,7 @@ o Show OpenAction in -info
|
|||||||
o Show more form information in -info
|
o Show more form information in -info
|
||||||
o Allow JSON / PDF syntax in dict processing and object exploration
|
o Allow JSON / PDF syntax in dict processing and object exploration
|
||||||
o Show %Bookmark text when stamping text
|
o Show %Bookmark text when stamping text
|
||||||
|
o Change units for -info[-json] and -page-info[-json]
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
||||||
|
BIN
cpdfmanual.pdf
BIN
cpdfmanual.pdf
Binary file not shown.
@@ -1,5 +1,3 @@
|
|||||||
%Document -replace-stream
|
|
||||||
%Document -cm -in -mm
|
|
||||||
\documentclass{book}
|
\documentclass{book}
|
||||||
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf,
|
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf,
|
||||||
% dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.
|
% dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.
|
||||||
@@ -63,7 +61,7 @@ Command Line Tools}
|
|||||||
\vspace{12mm}
|
\vspace{12mm}
|
||||||
|
|
||||||
{\Huge User Manual}\\
|
{\Huge User Manual}\\
|
||||||
Version 2.7.2 (October 2024)
|
Version 2.7.3 (January 2025)
|
||||||
|
|
||||||
\vspace{25mm}
|
\vspace{25mm}
|
||||||
|
|
||||||
@@ -3172,10 +3170,10 @@ given page range.
|
|||||||
\index{metadata}
|
\index{metadata}
|
||||||
\begin{framed}
|
\begin{framed}
|
||||||
|
|
||||||
\small\noindent\verb!cpdf -info[-json] [-utf8] in.pdf!
|
\small\noindent\verb!cpdf -info[-json] [-utf8] [-in | -cm | -mm] in.pdf!
|
||||||
|
|
||||||
\vspace{1.5mm}
|
\vspace{1.5mm}
|
||||||
\small\noindent\verb!cpdf -page-info[-json] in.pdf [<range>]!
|
\small\noindent\verb!cpdf -page-info[-json] [-in | -cm | -mm] in.pdf [<range>]!
|
||||||
|
|
||||||
\vspace{1.5mm}
|
\vspace{1.5mm}
|
||||||
\small\noindent\verb!cpdf -pages in.pdf!
|
\small\noindent\verb!cpdf -pages in.pdf!
|
||||||
@@ -3281,7 +3279,7 @@ XMP dc:creator: Adobe Systems Incorporated
|
|||||||
XMP dc:description: Adobe Portable Document Format (PDF)
|
XMP dc:description: Adobe Portable Document Format (PDF)
|
||||||
\end{verbatim}}\end{framed}
|
\end{verbatim}}\end{framed}
|
||||||
\noindent The details of the format for creation and modification dates can be found in
|
\noindent The details of the format for creation and modification dates can be found in
|
||||||
Appendix~\ref{dates}. If page boxes vary among pages, the entry will read \texttt{various}.
|
Appendix~\ref{dates}. If page boxes vary among pages, the entry will read \texttt{various}. Add \texttt{-in}, \texttt{-cm} or \texttt{mm} to print boxes in inches, centimetres, or millimetres instead of points.
|
||||||
|
|
||||||
By default, cpdf strips to ASCII, discarding character codes in excess of 127. In order to preserve the original unicode, add the \texttt{-utf8} option. To disable all post-processing of the string, add \texttt{-raw}. See Section \ref{textencodings} for more information.
|
By default, cpdf strips to ASCII, discarding character codes in excess of 127. In order to preserve the original unicode, add the \texttt{-utf8} option. To disable all post-processing of the string, add \texttt{-raw}. See Section \ref{textencodings} for more information.
|
||||||
|
|
||||||
@@ -3355,7 +3353,7 @@ Annotations: 0
|
|||||||
\end{verbatim}}
|
\end{verbatim}}
|
||||||
\end{framed}
|
\end{framed}
|
||||||
|
|
||||||
\noindent Note that the format for boxes is minimum x, minimum y, maximum x, maximum y. Using \texttt{-page-info-json} we can get the information in JSON format. For example:
|
\noindent Note that the format for boxes is minimum x, minimum y, maximum x, maximum y. Add \texttt{-in}, \texttt{-cm} or \texttt{mm} to print boxes in inches, centimetres, or millimetres instead of points. Using \texttt{-page-info-json} we can get the information in JSON format. For example:
|
||||||
|
|
||||||
\begin{framed}
|
\begin{framed}
|
||||||
{\small\begin{verbatim}
|
{\small\begin{verbatim}
|
||||||
@@ -5823,7 +5821,10 @@ Cpdf can add PDF/UA structure data when drawing on new PDF/UA files. For example
|
|||||||
|
|
||||||
\vspace{1.5mm}
|
\vspace{1.5mm}
|
||||||
\noindent\verb!cpdf -extract-stream[-decompress] <obj num> in.pdf [-o out.dat | -stdout]!
|
\noindent\verb!cpdf -extract-stream[-decompress] <obj num> in.pdf [-o out.dat | -stdout]!
|
||||||
\end{framed}}
|
|
||||||
|
\vspace{1.5mm}
|
||||||
|
\noindent\verb!cpdf -replace-stream <obj num> -replace-stream-with <filename>!\\
|
||||||
|
\noindent\verb! in.pdf -o out.pdf!\end{framed}}
|
||||||
\section{Draft Documents}
|
\section{Draft Documents}
|
||||||
\index{draft}
|
\index{draft}
|
||||||
\label{draft}
|
\label{draft}
|
||||||
@@ -6093,6 +6094,18 @@ We may also edit dictionary entries with \texttt{-replace-obj} by giving an obje
|
|||||||
|
|
||||||
\noindent Any part of the object specification not already present will be fabricated using direct nested dictionaries. For example, if \texttt{/MarkInfo} does not exist in the root dictionary, this command adds \texttt{/MarkInfo <</Marked true>>} to the root dictionary.
|
\noindent Any part of the object specification not already present will be fabricated using direct nested dictionaries. For example, if \texttt{/MarkInfo} does not exist in the root dictionary, this command adds \texttt{/MarkInfo <</Marked true>>} to the root dictionary.
|
||||||
|
|
||||||
|
Stream contents may be replaced with \texttt{-replace-stream}:
|
||||||
|
|
||||||
|
\begin{framed}
|
||||||
|
\small\noindent\verb!cpdf -replace-stream 4 -replace-stream-with in.dat in.pdf -o out.pdf!
|
||||||
|
|
||||||
|
\vspace{2.5mm}
|
||||||
|
\noindent Replace stream object 4's contents with the contents of \texttt{in.dat}.
|
||||||
|
|
||||||
|
\end{framed}
|
||||||
|
|
||||||
|
\noindent The stream dictionary is unaffected, save for any correction to its length entry.
|
||||||
|
|
||||||
\begin{cpdflib}
|
\begin{cpdflib}
|
||||||
\clearpage
|
\clearpage
|
||||||
\section*{C Interface}
|
\section*{C Interface}
|
||||||
|
Reference in New Issue
Block a user