Trait PdfPageAnnotationVariableText

Source
pub trait PdfPageAnnotationVariableText<'a> {
    // Required methods
    fn font_size(&self, form: &PdfForm<'_>) -> Result<PdfPoints, PdfiumError>;
    fn is_font_auto_sized(&self, form: &PdfForm<'_>) -> bool;
    fn font_color(&self, form: &PdfForm<'_>) -> Result<PdfColor, PdfiumError>;
    fn set_font_color(
        &mut self,
        form: &PdfForm<'_>,
        color: PdfColor,
    ) -> Result<(), PdfiumError>;
    fn justification(
        &self,
    ) -> Result<PdfPageAnnotationVariableTextJustification, PdfiumError>;
    fn rich_text(&self) -> Option<String>;
}
Expand description

Text-handling functions common to all PdfPageAnnotation types that support custom text.

Required Methods§

Source

fn font_size(&self, form: &PdfForm<'_>) -> Result<PdfPoints, PdfiumError>

Returns the size of the text in this annotation. A value of PdfPoints::ZERO indicates that the font size is determined automatically from the annotation height. See also the PdfPageAnnotationVariableText::is_font_auto_sized() function.

Source

fn is_font_auto_sized(&self, form: &PdfForm<'_>) -> bool

Returns true if the font size for this annotation is determined automatically from the annotation height.

Source

fn font_color(&self, form: &PdfForm<'_>) -> Result<PdfColor, PdfiumError>

Returns the color of the text in this annotation.

Source

fn set_font_color( &mut self, form: &PdfForm<'_>, color: PdfColor, ) -> Result<(), PdfiumError>

Sets the color of the text in this annotation.

Source

fn justification( &self, ) -> Result<PdfPageAnnotationVariableTextJustification, PdfiumError>

Returns the form of justification that should be used when displaying the text assigned to this annotation.

Source

fn rich_text(&self) -> Option<String>

Returns the rich text string assigned to this annotation, if any.

Rich text support was added in PDF version 1.5.

Implementors§

Source§

impl<'a, T> PdfPageAnnotationVariableText<'a> for T
where T: PdfPageAnnotationPrivate<'a>,