pub struct DocOptions {
pub generate_widget_ap: bool,
pub generate_widget_shapes: bool,
pub limits: Limits,
}Expand description
How much of the appearance-generation surface a document walk turns on.
Both switches are off by default because that is what the oracle does: it
builds every annotation list through the form-fill environment, which
disables the /NeedAppearances widget path outright. The implementations
exist for callers that want the documented viewer behavior instead.
use pdfrum_doc::DocOptions;
// Both switches are off by default, which is what a viewer building
// its annotation list through the form-fill environment does.
assert!(!DocOptions::default().generate_widget_ap);
// Turn on the documented `/NeedAppearances` behaviour instead:
let options = DocOptions {
generate_widget_ap: true,
generate_widget_shapes: true,
..DocOptions::default()
};
assert!(options.generate_widget_shapes);Fields§
§generate_widget_ap: boolGenerate an appearance for a /NeedAppearances widget that has none.
generate_widget_shapes: boolDraw the check, cross, star, circle, square and diamond glyphs for checkbox and radio widgets.
limits: LimitsDepth and size caps.
Trait Implementations§
Source§impl Clone for DocOptions
impl Clone for DocOptions
Source§impl Debug for DocOptions
impl Debug for DocOptions
Source§impl Default for DocOptions
impl Default for DocOptions
impl Eq for DocOptions
Source§impl PartialEq for DocOptions
impl PartialEq for DocOptions
impl StructuralPartialEq for DocOptions
Auto Trait Implementations§
impl Freeze for DocOptions
impl RefUnwindSafe for DocOptions
impl Send for DocOptions
impl Sync for DocOptions
impl Unpin for DocOptions
impl UnsafeUnpin for DocOptions
impl UnwindSafe for DocOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more