[−][src]Struct mupdf::PdfDocument
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ⓘ
[src]
pub fn new_bool(&self, b: bool) -> 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]
&mut self,
font: &Font,
ordering: CjkFontOrdering,
wmode: WriteMode,
serif: bool
) -> Result<PdfObject, Error>
pub fn add_simple_font(
&mut self,
font: &Font,
encoding: SimpleFontEncoding
) -> Result<PdfObject, Error>
[src]
&mut self,
font: &Font,
encoding: SimpleFontEncoding
) -> Result<PdfObject, Error>
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]
&self,
filename: &str,
options: PdfWriteOptions
) -> Result<(), Error>
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]
&self,
w: &mut W,
options: PdfWriteOptions
) -> Result<u64, Error>
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]
&mut self,
page_no: i32,
size: T
) -> Result<PdfPage, Error>
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]
&mut self,
page_no: i32,
page: &PdfObject
) -> Result<(), Error>
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 resolve_link(&self, uri: &str) -> Result<Option<Location>, 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]
&self,
start_page: i32,
end_page: i32,
rotate: u32
) -> Result<PdfDocument, Error>
pub fn convert_to_pdf_with_cookie(
&self,
start_page: i32,
end_page: i32,
rotate: u32,
cookie: &Cookie
) -> Result<PdfDocument, Error>
[src]
&self,
start_page: i32,
end_page: i32,
rotate: u32,
cookie: &Cookie
) -> Result<PdfDocument, Error>
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.
pub fn deref(&self) -> &Self::Target
[src]
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?
pub fn into_iter(self) -> Self::IntoIter
[src]
impl TryFrom<Document> for PdfDocument
[src]
Auto Trait Implementations
impl RefUnwindSafe for PdfDocument
[src]
impl !Send for PdfDocument
[src]
impl !Sync for PdfDocument
[src]
impl Unpin for PdfDocument
[src]
impl UnwindSafe for PdfDocument
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,