Correct UTF8 outputs
This commit is contained in:
parent
dface55e76
commit
249ce52e03
|
@ -136,7 +136,7 @@ let list_attached_files pdf =
|
|||
| Some ((Pdf.Dictionary _) as d) ->
|
||||
begin match Pdf.lookup_direct pdf "/F" d with
|
||||
| Some stream ->
|
||||
{name = x;
|
||||
{name = Pdftext.utf8_of_pdfdocstring x;
|
||||
pagenumber = 0;
|
||||
data =
|
||||
(fun () ->
|
||||
|
@ -174,7 +174,7 @@ let list_attached_files pdf =
|
|||
begin match Pdf.lookup_direct pdf "/F" d with
|
||||
| Some stream ->
|
||||
Some
|
||||
{name = s;
|
||||
{name = Pdftext.utf8_of_pdfdocstring s;
|
||||
pagenumber = pagenumber;
|
||||
data =
|
||||
(fun () ->
|
||||
|
@ -190,7 +190,7 @@ let list_attached_files pdf =
|
|||
end
|
||||
| _ ->
|
||||
Some
|
||||
{name = s;
|
||||
{name = Pdftext.utf8_of_pdfdocstring s;
|
||||
pagenumber = pagenumber;
|
||||
data = (fun () -> raise (Pdf.PDFError "no attachment data"))}
|
||||
end
|
||||
|
|
BIN
cpdfmanual.pdf
BIN
cpdfmanual.pdf
Binary file not shown.
|
@ -2395,7 +2395,7 @@ NB: For all imposition options, see also discussion of \texttt{-fast} in Section
|
|||
\section{Listing Annotations}
|
||||
\index{annotations!listing}
|
||||
The \texttt{-list-annotations} operation prints the textual content of any
|
||||
annotations on the selected pages to standard output. Each annotation is preceded by the page number and followed by a newline. See Section \ref{textencodings} for more information on text encodings in the output of this operation.
|
||||
annotations on the selected pages to standard output. Each annotation is preceded by the page number and followed by a newline. The output of this operation is always UTF8.
|
||||
\begin{framed}
|
||||
\small\verb!cpdf -list-annotations in.pdf > annots.txt!
|
||||
|
||||
|
@ -3285,7 +3285,7 @@ In a PDF file, optional content groups are used to group graphical elements toge
|
|||
\noindent\verb!cpdf -ocg-list in.pdf!
|
||||
\end{framed}}
|
||||
|
||||
\noindent List the optional content groups in the PDF, one per line, to standard output.
|
||||
\noindent List the optional content groups in the PDF, one per line, to standard output. UTF8.
|
||||
|
||||
{\small\begin{framed}
|
||||
\noindent\verb!cpdf -ocg-rename -ocg-rename-from <a> -ocg-rename-to <b> in.pdf -o out.pdf!
|
||||
|
|
|
@ -96,7 +96,7 @@ let ocg_get_list pdf =
|
|||
rev !l
|
||||
|
||||
let ocg_list pdf =
|
||||
List.iter (Printf.printf "%s\n") (ocg_get_list pdf)
|
||||
List.iter (Printf.printf "%s\n") (map Pdftext.utf8_of_pdfdocstring (ocg_get_list pdf))
|
||||
|
||||
let ocg_rename f t pdf =
|
||||
Pdf.objselfmap
|
||||
|
|
Loading…
Reference in New Issue