pub struct AnnotationBuilder { /* private fields */ }Expand description
Builder for creating PDF annotations.
Implementations§
Source§impl AnnotationBuilder
impl AnnotationBuilder
pub fn highlight(rect: Rect, quad_points: Vec<f64>, color: AnnotColor) -> Self
pub fn underline(rect: Rect, quad_points: Vec<f64>, color: AnnotColor) -> Self
pub fn strike_out(rect: Rect, quad_points: Vec<f64>, color: AnnotColor) -> Self
pub fn squiggly(rect: Rect, quad_points: Vec<f64>, color: AnnotColor) -> Self
pub fn text(rect: Rect, contents: &str) -> Self
pub fn free_text(rect: Rect, text: &str, da: &str) -> Self
pub fn line(start: (f64, f64), end: (f64, f64)) -> Self
pub fn square(rect: Rect) -> Self
pub fn circle(rect: Rect) -> Self
pub fn polygon(rect: Rect, vertices: Vec<(f64, f64)>) -> Self
pub fn polyline(rect: Rect, vertices: Vec<(f64, f64)>) -> Self
pub fn ink(rect: Rect, ink_list: Vec<Vec<(f64, f64)>>) -> Self
pub fn stamp(rect: Rect, stamp_name: &str) -> Self
pub fn link_uri(rect: Rect, uri: &str) -> Self
pub fn link_goto(rect: Rect, dest: PdfObject) -> Self
pub fn file_attachment(rect: Rect, fs_ref: IndirectRef, icon_name: &str) -> Self
pub fn redact(rect: Rect) -> Self
pub fn contents(self, contents: &str) -> Self
pub fn color(self, color: AnnotColor) -> Self
pub fn border(self, border: BorderStyle) -> Self
pub fn flags(self, flags: AnnotationFlags) -> Self
pub fn line_endings(self, start: LineEndingStyle, end: LineEndingStyle) -> Self
pub fn interior_color(self, color: AnnotColor) -> Self
pub fn overlay_text(self, text: &str) -> Self
pub fn justification(self, q: i64) -> Self
Sourcepub fn build_dict(&self) -> PdfDict
pub fn build_dict(&self) -> PdfDict
Build the annotation dictionary.
Auto Trait Implementations§
impl Freeze for AnnotationBuilder
impl RefUnwindSafe for AnnotationBuilder
impl Send for AnnotationBuilder
impl Sync for AnnotationBuilder
impl Unpin for AnnotationBuilder
impl UnsafeUnpin for AnnotationBuilder
impl UnwindSafe for AnnotationBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more