pub struct Document {
pub title: Option<String>,
pub author: Option<String>,
pub subject: Option<String>,
pub keywords: Option<String>,
pub page_mode: Option<String>,
pub hyphenation: Option<HyphenationLang>,
pub fonts: Vec<FontDefinition>,
pub sections: Vec<DocumentSection>,
pub pages: Vec<Page>,
}Expand description
Root document container.
Add pages to pages and optionally set metadata like title.
Fields§
§title: Option<String>§subject: Option<String>§keywords: Option<String>§page_mode: Option<String>§hyphenation: Option<HyphenationLang>Default hyphenation language for all pages (can be overridden per-page).
fonts: Vec<FontDefinition>§sections: Vec<DocumentSection>Ordered output flow (pages and imported PDF sections)
pages: Vec<Page>Backwards-compatible collection of generated pages
Implementations§
Source§impl Document
impl Document
Sourcepub fn push_import_pdf(&mut self, import: ImportedPdfPages)
pub fn push_import_pdf(&mut self, import: ImportedPdfPages)
Append an imported PDF section at the current position.
Sourcepub fn push_import_pdf_bytes(
&mut self,
bytes: impl Into<Vec<u8>>,
pages: impl IntoIterator<Item = u32>,
)
pub fn push_import_pdf_bytes( &mut self, bytes: impl Into<Vec<u8>>, pages: impl IntoIterator<Item = u32>, )
Append an in-memory imported PDF section at the current position.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
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
Mutably borrows from an owned value. Read more