Skip to main content

AnnotBorderStyle

Type Alias AnnotBorderStyle 

Source
pub type AnnotBorderStyle = BorderStyle;
Expand description

Border style written as /BS /S (ISO 32000-1 table 166).

This is pdfrum_doc::ap::BorderStyle, the same type the read side and the form layer already use: one set of five values, named once. Reading a /BS yields it, and writing one takes it.

The two sides differ in how they arrive at a value, not in the value. Reading is deliberately lenient — the style comes from the first byte of /S alone, so /Dotted reads as Dash — while writing goes through BorderStyleName::as_bytes, which emits exactly the five legal names.

use pdfrum_edit::{AnnotBorderStyle, BorderStyleName, MarkupKind, MarkupSpec, SquareSpec, TextSpec};

assert_eq!(AnnotBorderStyle::Solid.as_bytes(), b"S");
assert_eq!(AnnotBorderStyle::Dash.as_bytes(), b"D");

Aliased Type§

pub enum AnnotBorderStyle {
    Solid,
    Dash,
    Beveled,
    Inset,
    Underline,
}

Variants§

§

Solid

One solid line.

§

Dash

A dashed line.

§

Beveled

A raised bevel.

§

Inset

A recessed bevel.

§

Underline

A line along the bottom edge only.

Trait Implementations§

Source§

impl BorderStyleName for AnnotBorderStyle

Source§

fn as_bytes(&self) -> &'static [u8] ⓘ

The PDF name bytes for /BS /S.