pub enum ActionKind {
Show 19 variants
GoTo {
page_index: Option<usize>,
raw_dest: Option<String>,
},
GoToR {
file: Option<String>,
new_window: Option<bool>,
raw_dest: Option<String>,
},
GoToE {
file: Option<String>,
raw_dest: Option<String>,
},
Launch {
file: Option<String>,
new_window: Option<bool>,
},
Thread,
Uri {
uri: String,
is_map: bool,
},
Sound,
Movie,
Hide {
hide: bool,
target: Option<String>,
},
Named {
name: String,
},
SubmitForm {
url: Option<String>,
flags: u32,
},
ResetForm {
flags: u32,
},
ImportData {
file: Option<String>,
},
JavaScript {
script: String,
},
SetOcgState {
on_count: usize,
off_count: usize,
toggle_count: usize,
},
Rendition,
Trans,
GoTo3DView,
Other {
kind: String,
},
}Expand description
Typed action payload — Table 198’s 18 action types.
Variants§
GoTo
/S /GoTo — in-document jump (§12.6.4.2 Table 199). /D is
either an explicit [page-ref mode args …] array (caller
can re-decode via crate::reader::link) or a named
destination (Name / string).
Fields
GoToR
/S /GoToR — remote go-to (§12.6.4.3 Table 200).
/F is the Filespec — surfaced
as its /UF//F filename string.
Fields
raw_dest: Option<String>Raw /D destination (same shape as Self::GoTo’s
raw_dest).
GoToE
/S /GoToE — embedded go-to (PDF 1.6 — §12.6.4.4 Table 201).
Refers to an embedded file (/T target dict chain).
Fields
Launch
/S /Launch — launch external app or open external file
(§12.6.4.5 Table 202).
Fields
Thread
/S /Thread — go-to-article-thread (§12.6.4.6).
Uri
/S /URI — open a URL (§12.6.4.7 Table 206). /URI is the
ASCII-encoded URI; /IsMap marks form-coordinate posting.
Sound
/S /Sound — play a sound (§12.6.4.8 Table 207).
Movie
/S /Movie — play a movie (§12.6.4.9 Table 208). Legacy
(replaced by Rendition in PDF 1.5).
Hide
/S /Hide — show / hide annotations (§12.6.4.10 Table 209).
Fields
Named
/S /Named — invoke a predefined action by name
(§12.6.4.11 Table 211).
Fields
SubmitForm
/S /SubmitForm — submit form data to a URL
(§12.7.5.2 Table 236).
Fields
ResetForm
/S /ResetForm — reset form-field values (§12.7.5.3 Table 239).
ImportData
/S /ImportData — import form data from a file
(§12.7.5.4 Table 240).
JavaScript
/S /JavaScript — execute JavaScript (§12.6.4.16 Table 217).
/JS is either a literal-string or a stream of UTF-8 / UTF-16
JavaScript source — round-36 recovers it to a String through
the same PDFDocEncoding / UTF-16BE-BOM lossy decoder the rest
of the reader uses.
SetOcgState
/S /SetOCGState — toggle optional-content groups
(§12.6.4.12 Table 212). The state array is preserved as
the count of On/Off/Toggle entries.
Fields
Rendition
/S /Rendition — multimedia rendition (§12.6.4.13 Table 213).
PDF 1.5 — replaces the legacy Movie / Sound types.
Trans
/S /Trans — slide-show transition (§12.6.4.14).
GoTo3DView
/S /GoTo3DView — change 3D camera view (§12.6.4.15 Table 215).
Other
/S value the round didn’t decode — name surfaced verbatim.
Trait Implementations§
Source§impl Clone for ActionKind
impl Clone for ActionKind
Source§fn clone(&self) -> ActionKind
fn clone(&self) -> ActionKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more