pub enum PdfEditBlocker {
UnsupportedFontType,
NoReversibleEncoding,
MissingMetrics,
MixedTextState,
UnmappedGlyphs,
SpansAcrossStreams,
PositionedTextRun,
}Expand description
Why an island’s own font cannot be used to write replacement text. Serialized as a snake_case
string in PdfTextIsland::edit_blocker. editable == false with one of these means “no
replacement can be written through this island’s font at all”; a replacement that merely needs
a glyph the font lacks is not a blocker (see PdfEditError::MissingGlyphs).
Variants§
UnsupportedFontType
Type3, an unrecognised font subtype, a Type0 font whose CMap is not Identity-H, or no
resolvable font resource at all.
NoReversibleEncoding
The font has no code-to-character table that can be inverted exactly from data in the
file: no ToUnicode and no /Encoding the engine can interpret exactly (a symbolic
embedded font with a built-in encoding, an unknown base encoding, an /Encoding dictionary
the parser cannot read), or none of its codes carries a positive explicit width.
MissingMetrics
A code has no width where the font demands authoritative metrics, so glyph geometry (and therefore a safe fit check) is unavailable.
MixedTextState
The island mixes fonts, sizes, scales or spacing, so one replacement string cannot reproduce it without changing its look.
UnmappedGlyphs
At least one glyph has no Unicode value; replacing the island text would silently drop it.
SpansAcrossStreams
The island’s source spans live in more than one content stream.
PositionedTextRun
The island contains a word gap made by moving the text position (Td, Tm, …) rather
than by TJ adjustments, or a positioning/state operator between two of its show
operators, so an edit touching that seam could not be rebuilt faithfully.
Trait Implementations§
Source§impl Clone for PdfEditBlocker
impl Clone for PdfEditBlocker
impl Copy for PdfEditBlocker
Source§impl Debug for PdfEditBlocker
impl Debug for PdfEditBlocker
impl Eq for PdfEditBlocker
Source§impl PartialEq for PdfEditBlocker
impl PartialEq for PdfEditBlocker
Source§impl Serialize for PdfEditBlocker
impl Serialize for PdfEditBlocker
impl StructuralPartialEq for PdfEditBlocker
Auto Trait Implementations§
impl Freeze for PdfEditBlocker
impl RefUnwindSafe for PdfEditBlocker
impl Send for PdfEditBlocker
impl Sync for PdfEditBlocker
impl Unpin for PdfEditBlocker
impl UnsafeUnpin for PdfEditBlocker
impl UnwindSafe for PdfEditBlocker
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.