pub struct Writer {Show 22 fields
pub b: BasicPdfWriter,
pub p: Page,
pub fonts: FontFamily,
pub cur_font: usize,
pub font_size: Px,
pub sup: Px,
pub mode: Mode,
pub title: String,
pub pages: Vec<Page>,
pub new_page: bool,
pub line_pad: Px,
pub margin_left: Px,
pub margin_right: Px,
pub margin_top: Px,
pub margin_bottom: Px,
pub page_width: Px,
pub page_height: Px,
pub line_used: MPx,
pub line: Vec<Item>,
pub max_font_size: Px,
pub center: bool,
pub fetcher: Option<Box<dyn Fetcher>>,
}Expand description
Writer - has support for wrapping text, page layout, fonts, etc.
Fields§
§b: BasicPdfWriterUnderlying Basic Writer
p: PageCurrent Page
fonts: FontFamilyList of fonts
cur_font: usizeIndex into fonts
font_size: PxCurrent font size, default is 10
sup: PxCurrent sup ( raises text up off line ), use set_sup to adjust it
mode: ModeWriting mode
title: StringPDF title
pages: Vec<Page>List of Pages
new_page: boolPage is new ( not yet initialised )
line_pad: PxLine padding ( space between lines ) default is 4
margin_left: PxLine margin ( left ), default is 20
margin_right: PxLine margin ( right ), default is 20
margin_top: PxTop margin, default is 20
margin_bottom: PxBottom margin, default is 20
page_width: PxPage width, default is 600
page_height: PxPage height, default is 800
line_used: MPxLine used ( controls word-wrapping )
line: Vec<Item>Line items
max_font_size: PxLargest font for current line
center: boolDefault is zero, set to 1 to center output lines
fetcher: Option<Box<dyn Fetcher>>For fetching fonts and images
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Writer
impl !RefUnwindSafe for Writer
impl !Send for Writer
impl !Sync for Writer
impl Unpin for Writer
impl UnsafeUnpin for Writer
impl !UnwindSafe for Writer
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