diff --git a/cpdfmanual.pdf b/cpdfmanual.pdf index 7d89350..8c90b7d 100644 Binary files a/cpdfmanual.pdf and b/cpdfmanual.pdf differ diff --git a/cpdfmanual.tex b/cpdfmanual.tex index 7681367..c1136f5 100644 --- a/cpdfmanual.tex +++ b/cpdfmanual.tex @@ -5467,6 +5467,9 @@ Once we are sure a file complies to PDF/UA, in terms of both machine and human c \vspace{1.5mm} \noindent\verb!cpdf -obj in.pdf! + \vspace{1.5mm} + \noindent\verb!cpdf -replace-obj = in.pdf! + \vspace{1.5mm} \noindent\verb!cpdf -extract-stream[-decompress] in.pdf [-o out.dat | -stdout]! \end{framed}} @@ -5718,6 +5721,17 @@ $ cpdf -extract-stream-decompress 2 hello.pdf -stdout \noindent By these mechanisms, ad-hoc exploration of PDF files is possible. +We may also edit dictionary entries with \texttt{-replace-obj} by giving an object specification, and the new value in JSON format: + + \begin{framed} + \small\noindent\verb!cpdf -replace-obj /Root/MarkInfo/Marked=true in.pdf -o out.pdf! + + \vspace{2.5mm} + \noindent Replace or add dictionary entry in \texttt{in.pdf}, writing to \texttt{out.pdf}. + \end{framed} + +\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 <>} to the root dictionary. + \begin{cpdflib} \clearpage \section*{C Interface}