From 900f9c8acd5539f3565808597842e3a58d7f47ee Mon Sep 17 00:00:00 2001 From: John Whitington Date: Sun, 23 Jan 2022 12:20:41 +0000 Subject: [PATCH] Remove misleading description of JSON string format --- cpdfjson.ml | 7 +------ cpdfmanual.pdf | Bin 282739 -> 282599 bytes cpdfmanual.tex | 12 ++++-------- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/cpdfjson.ml b/cpdfjson.ml index d1f366b..5cdf688 100644 --- a/cpdfjson.ml +++ b/cpdfjson.ml @@ -23,12 +23,7 @@ Objects 1..n: The PDF's objects. o Names are written as {"N": "/Pages"} o Indirect references are integers o Streams are {"S": [dict, data]} - o Strings are converted from UTF16BE/PDFDocEncoding to UTF8 before being - encoded in JSON. When they are read back the process is JSON encoded --> UTF8 - --> UTF16BE/PDFDocEncoding. This process is fully reversible: it is to allow - easier editing of strings. This does not happen to strings within text - operators in parsed content streams, nor to /ID values in the - trailerdictionary, since neither is UTF16BE/PdfDocEncoding to begin with. + o Strings are converted into JSON strings in a way which is fully reversible. There are two subformats: parsing content streams or not. Hello World in CPDF JSON without parsing content streams: diff --git a/cpdfmanual.pdf b/cpdfmanual.pdf index 70fb25865a6887e6a19cf5d245eea2c737abe8c4..55ed2f3832d81f791084c418a737de22734ba71f 100644 GIT binary patch delta 8499 zcmai&RZv_(ql9sH76~pv7GE@rdvFcz?rwnu7PrOS6G(6k8X)N6ZXq~9f-dfU`L8_R zhcngF^UYNCR82pei?4*cUkHO65e@v2ctM#UPedT3Lr>XlOOT-RL2r*0nK1J^YqB8# zn|~EI_G=>NyjU@KiYVWnUAcy1@T}`3NoFyH+D=GO^Hwt8-Nks)#oRyV^JAqF#L~B_ z{zPM>AxaqW4Rjl!@018v!X;J@b?lZL`iLobg*)<1zGcyADcbfkDAn`hG9(lBqr^Vx z|4}W4wAYva(X~Ez5WKVNMZ%JpKP3EW7{fo5nVM@v0dV)F)*!NDTM(YGp(AIJ)^BCI z<-N0t>p^5hD^9VSw3w0%4N>urR{nI7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yh1$;Z7HDn4noHMoZo7(Jp^?=ITMM#pyEou;P!{SpP4HNZ=g$@U zgVErGt0}W-byLz9)5_rVLu6X~J5wd@mXN{m)?$lqPS91ceybbkNZ?^*=(!%(tii8w zb!==TTN|mt^Nxzw;byv+WT6m`(TJKi;KrSEHXzHfeku#!=->|u4EQG6px1T6+u-R> z(dlv%LE6d_V6oO(BN z6)P#WCMpe&XqKT@B2XKP(#ta!Du{KHyCTMZ=B(eXESXkXX?~xk+FCixTO$y#cWV`& zDfJNIG=&aUKjOqJj00!(<-Eo^&Ixwwtc=I7F zd$huES6F-D?%{bh%#I$1Jx+hEg{>_df6-=9Swx(sV;HR>%bLLS5X#=kyF~YK&ai2Zs;HE;hKrk&wn989OGEkOL?#Hr0Cb zdKAwA6bA`dXq-pyHw@L;`Q{knEJ;CtDl*1&KnAC3=-F}WpS$e#3BQFg_9iNQg>-dt zg+DF3KkgoGnFdbIq>1k@loSpOu_tIS<7W7BW zEjl{<-C_(iMshHI_9IdXF2#iI#9A6gAl>iKel$c{^#2D7Q3QXB5zHY)t=bP+z*YA{ zL(4l&gIy^)ys&!~wL2ymI&#DbeEvP>`uEM+Kws~YQ^g&gm-n!8l2}EZ0DI6m#I)7; z=vvTg(Xzrf)7yK2jU~!^ui@v&ucO*|wjTwv#5sh~#hA8baXKdXKYtRDR&@wf{Lnt;{J-rxZXMMT7mej(+}tyQsB#5wR<8y!Ehayo N5GFIToQ6E+{{RG*G annots.txt! + \small\verb!cpdf -list-annotations-json in.pdf > annots.json! \vspace{2.5mm} - \noindent Print annotations from \texttt{in.pdf}, redirecting output to \texttt{annots.txt}. + \noindent Print annotations from \texttt{in.pdf} in JSON format, redirecting output to \texttt{annots.json}. \end{framed} -This produces an array of (page number, CPDFJSON) pairs giving the PDF structure of each annotation. Destination pages for page links will have page numbers in place of internal PDF page links, and certain indirect objects are made direct but the content is otherwise unaltered. Here is an example entry for an annotation on page 10: +This produces an array of (page number, annotation) pairs giving the PDF structure of each annotation. Destination pages for page links will have page numbers in place of internal PDF page links, and certain indirect objects are made direct but the content is otherwise unaltered. Here is an example entry for an annotation on page 10: {\small\begin{verbatim} [ @@ -3171,11 +3171,7 @@ number, and flags used when writing (which may be required when reading): \item Names are written as \texttt{\{"N":\ "/Pages"\}} \item Indirect references are integers \item Streams are \texttt{\{"S":\ [dict, data]\}} - \item Strings are converted from UTF16BE/PDFDocEncoding to UTF8 before being - encoded in JSON. This process is fully reversible: it is to allow - easier editing of strings. This does not happen to strings within text - operators in parsed content streams, nor to /ID values in the - trailer dictionary, since neither is UTF16BE/PDFDocEncoding to begin with. + \item Strings are converted to JSON string format in a way which, when reversed, results in the original string. \end{itemize} \noindent Here is an example of the output for a small PDF: