[][src]Struct mupdf::PdfDocument

pub struct PdfDocument { /* fields omitted */ }

Implementations

impl PdfDocument[src]

pub fn new() -> Self[src]

pub fn open(filename: &str) -> Result<Self, Error>[src]

pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>[src]

pub fn new_null(&self) -> PdfObject

Notable traits for PdfObject

impl Write for PdfObject
[src]

pub fn new_bool(&self, b: bool) -> PdfObject

Notable traits for PdfObject

impl Write for PdfObject
[src]

pub fn new_int(&self, i: i32) -> Result<PdfObject, Error>[src]

pub fn new_real(&self, f: f32) -> Result<PdfObject, Error>[src]

pub fn new_string(&self, s: &str) -> Result<PdfObject, Error>[src]

pub fn new_name(&self, name: &str) -> Result<PdfObject, Error>[src]

pub fn new_indirect(&self, num: i32, gen: i32) -> Result<PdfObject, Error>[src]

pub fn new_array(&self) -> Result<PdfObject, Error>[src]

pub fn new_dict(&self) -> Result<PdfObject, Error>[src]

pub fn new_graft_map(&self) -> Result<PdfGraftMap, Error>[src]

pub fn new_object_from_str(&self, src: &str) -> Result<PdfObject, Error>[src]

pub fn graft_object(&self, obj: &PdfObject) -> Result<PdfObject, Error>[src]

pub fn add_object(&mut self, obj: &PdfObject) -> Result<PdfObject, Error>[src]

pub fn create_object(&mut self) -> Result<PdfObject, Error>[src]

pub fn delete_object(&mut self, num: i32) -> Result<(), Error>[src]

pub fn add_image(&mut self, obj: &Image) -> Result<PdfObject, Error>[src]

pub fn add_font(&mut self, font: &Font) -> Result<PdfObject, Error>[src]

pub fn add_cjk_font(
    &mut self,
    font: &Font,
    ordering: CjkFontOrdering,
    wmode: WriteMode,
    serif: bool
) -> Result<PdfObject, Error>
[src]

pub fn add_simple_font(
    &mut self,
    font: &Font,
    encoding: SimpleFontEncoding
) -> Result<PdfObject, Error>
[src]

pub fn has_unsaved_changes(&self) -> bool[src]

pub fn is_dirty(&self) -> bool[src]

pub fn can_be_saved_incrementally(&self) -> bool[src]

pub fn save_with_options(
    &self,
    filename: &str,
    options: PdfWriteOptions
) -> Result<(), Error>
[src]

pub fn enable_js(&mut self) -> Result<(), Error>[src]

pub fn disable_js(&mut self) -> Result<(), Error>[src]

pub fn is_js_supported(&self) -> Result<bool, Error>[src]

pub fn calculate_form(&mut self) -> Result<(), Error>[src]

pub fn trailer(&self) -> Result<PdfObject, Error>[src]

pub fn catalog(&self) -> Result<PdfObject, Error>[src]

pub fn count_objects(&self) -> Result<u32, Error>[src]

pub fn has_acro_form(&self) -> Result<bool, Error>[src]

pub fn has_xfa_form(&self) -> Result<bool, Error>[src]

pub fn has_xref_streams(&self) -> bool[src]

pub fn has_old_style_xrefs(&self) -> bool[src]

pub fn permissions(&self) -> Permission[src]

pub fn save(&self, filename: &str) -> Result<(), Error>[src]

pub fn write_to_with_options<W: Write>(
    &self,
    w: &mut W,
    options: PdfWriteOptions
) -> Result<u64, Error>
[src]

pub fn write_to<W: Write>(&self, w: &mut W) -> Result<u64, Error>[src]

pub fn find_page(&self, page_no: i32) -> Result<PdfObject, Error>[src]

pub fn new_page_at<T: Into<Size>>(
    &mut self,
    page_no: i32,
    size: T
) -> Result<PdfPage, Error>
[src]

pub fn new_page<T: Into<Size>>(&mut self, size: T) -> Result<PdfPage, Error>[src]

pub fn insert_page(
    &mut self,
    page_no: i32,
    page: &PdfObject
) -> Result<(), Error>
[src]

pub fn delete_page(&mut self, page_no: i32) -> Result<(), Error>[src]

Methods from Deref<Target = Document>

pub fn needs_password(&self) -> Result<bool, Error>[src]

pub fn authenticate(&mut self, password: &str) -> Result<bool, Error>[src]

pub fn page_count(&self) -> Result<i32, Error>[src]

pub fn metadata(&self, name: MetadataName) -> Result<String, Error>[src]

pub fn is_reflowable(&self) -> Result<bool, Error>[src]

pub fn is_pdf(&self) -> bool[src]

pub fn convert_to_pdf(
    &self,
    start_page: i32,
    end_page: i32,
    rotate: u32
) -> Result<PdfDocument, Error>
[src]

pub fn layout(&mut self, width: f32, height: f32, em: f32) -> Result<(), Error>[src]

pub fn load_page(&self, page_no: i32) -> Result<Page, Error>[src]

pub fn pages(&self) -> Result<PageIter<'_>, Error>[src]

pub fn output_intent(&self) -> Result<Option<Colorspace>, Error>[src]

pub fn outlines(&self) -> Result<Vec<Outline>, Error>[src]

Trait Implementations

impl Debug for PdfDocument[src]

impl Deref for PdfDocument[src]

type Target = Document

The resulting type after dereferencing.

impl DerefMut for PdfDocument[src]

impl<'a> IntoIterator for &'a PdfDocument[src]

type Item = Result<Page, Error>

The type of the elements being iterated over.

type IntoIter = PageIter<'a>

Which kind of iterator are we turning this into?

impl TryFrom<Document> for PdfDocument[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.