mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-04-18 20:17:37 +02:00
Initial documentation for -preserve-actions
This commit is contained in:
parent
efcc697266
commit
125924aedb
BIN
cpdfmanual.pdf
BIN
cpdfmanual.pdf
Binary file not shown.
@ -1,4 +1,3 @@
|
||||
%Document that -draw-struct-tree when drawing on existing file will artifact the drawing
|
||||
%\DocumentMetadata{lang=en, pdfversion=2.0, pdfstandard=ua-2, pdfstandard=a-4f, testphase={phase-III, title, table, math, firstaid}}
|
||||
\documentclass{book}
|
||||
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf,
|
||||
@ -2147,7 +2146,7 @@ The option \texttt{-squeeze-no-pagedata} avoids the reprocessing of page data, w
|
||||
\small\noindent\verb!cpdf -list-bookmarks [-utf8] in.pdf!
|
||||
|
||||
\vspace{1.5mm}
|
||||
\small\noindent\verb!cpdf -list-bookmarks-json in.pdf!
|
||||
\small\noindent\verb!cpdf -list-bookmarks-json [-preserve-actions] in.pdf!
|
||||
|
||||
\vspace{1.5mm}
|
||||
\small\noindent\verb!cpdf -remove-bookmarks in.pdf -o out.pdf!
|
||||
@ -2228,6 +2227,8 @@ By using \texttt{-list-bookmarks-json} instead, the bookmarks are formatted as a
|
||||
|
||||
\noindent Note that the colour (RGB each from 0.0 to 1.0) and shape of the text (bold, italic, or both) can be read and set with the JSON format.
|
||||
|
||||
The \texttt{-preserve-actions} option will give the target in its original PDF form, rather than resolving it to a destination (see below).
|
||||
|
||||
See Chapter 15 for more details of Cpdf's JSON formatting. There are two differences here: bookmark text is always UTF8, and the numbers for \texttt{level} and \texttt{page} are plain, rather than begin surrounded with \texttt{ \{ "I": \}}.
|
||||
|
||||
\subsection{Destinations}
|
||||
@ -2290,6 +2291,8 @@ Bookmarks in JSON format (see above) may be added with \texttt{-add-bookmarks-js
|
||||
|
||||
\noindent Remember that strings in JSON bookmark files are in UTF8.
|
||||
|
||||
Note that, if \texttt{-preserve-actions} is used with \texttt{-list-bookmarks-json}, it will no be feasible to use \texttt{-add-bookmarks-json} to add these bookmarks to a different or modified file. They may be round-tripped to the same, unmodified file, of course.
|
||||
|
||||
\section{Opening bookmarks}
|
||||
\index{bookmarks!opening at level}
|
||||
As an alternative to extracting a bookmark file and manipulating the open-status of bookmarks, mass manipulation may be achieved by the following operation:
|
||||
|
15
cpdfua.ml
15
cpdfua.ml
@ -3,20 +3,13 @@ open Cpdferror
|
||||
|
||||
(* Implements the Matterhorn checks except for:
|
||||
|
||||
Unimplemented:
|
||||
31-011--016,018,030 Require looking inside font file
|
||||
|
||||
Partially implemented:
|
||||
31-027 Can require looking inside font files
|
||||
|
||||
10-001 Doesn't check CID keyed fonts
|
||||
|
||||
11-001 11-002 11-003 11-004 11-005 Natural Language (We just check for
|
||||
top-level document language.)
|
||||
|
||||
Unimplemented:
|
||||
31-011 31-012 31-013 31-014 31-015 31-016 31-018 31-030 Require looking
|
||||
inside font file
|
||||
|
||||
To return to:
|
||||
15_003 17_003 31_009 *)
|
||||
11-001--005 Natural Language (We just check for top-level document language.) *)
|
||||
|
||||
type subformat =
|
||||
| PDFUA1
|
||||
|
Loading…
x
Reference in New Issue
Block a user