pub fn to_string_lossy(&self) -> Result<String> {
        if self.data.starts_with(&[0xfe, 0xff]) {
            Ok(crate::font::utf16be_to_string_lossy(&self.data[2..])?)
        }
        else {
            Ok(String::from_utf8_lossy(&self.data).into())
        }
    }
/// without encoding information the PdfString cannot be decoded into a String
/// therefore only lossy decoding is possible replacing unknown characters.
/// For decoding correctly see
/// pdf_tools/src/lib.rs
without encoding information the PdfString cannot be decoded into a String
therefore only lossy decoding is possible replacing unknown characters.
For decoding correctly see
pdf_tools/src/lib.rs
without encoding information the PdfString cannot be decoded into a String therefore only lossy decoding is possible replacing unknown characters . For decoding correctly see pdf_tools / src / lib . rs
pub fn to_string_lossy(&self) -> Result<String> {
        if self.data.starts_with(&[0xfe, 0xff]) {
            Ok(crate::font::utf16be_to_string_lossy(&self.data[2..])?)
        }
        else {
            Ok(String::from_utf8_lossy(&self.data).into())
        }
    }
pub fn to_string_lossy ( & self ) -> Result < String > { if self . data . starts_with ( & [ 0xfe , 0xff ] ) { Ok ( crate :: font :: utf16be_to_string_lossy ( & self . data [ 2 .. ] ) ? ) } else { Ok ( String :: from_utf8_lossy ( & self . data ) . into ( ) ) } }
without encoding information the PdfString cannot be decoded into a String
therefore only lossy decoding is possible replacing unknown characters.
without encoding information the PdfString cannot be decoded into a String therefore only lossy decoding is possible replacing unknown characters .
&self
&self