pub struct LinearizedPdfBuilder { /* private fields */ }Expand description
Builder for creating linearized PDFs.
Implementations§
Source§impl LinearizedPdfBuilder
impl LinearizedPdfBuilder
Sourcepub fn new(num_pages: u32, config: LinearizationConfig) -> Self
pub fn new(num_pages: u32, config: LinearizationConfig) -> Self
Create a new linearized PDF builder.
Sourcepub fn set_first_page_object(&mut self, obj_num: u32)
pub fn set_first_page_object(&mut self, obj_num: u32)
Set the first page object number.
Sourcepub fn set_first_page_num(&mut self, page_num: u32)
pub fn set_first_page_num(&mut self, page_num: u32)
Set the first page number (for alternate first page display).
Sourcepub fn set_file_length(&mut self, length: u64)
pub fn set_file_length(&mut self, length: u64)
Update file length after writing.
Sourcepub fn set_hint_stream_info(&mut self, offset: u64, length: u64)
pub fn set_hint_stream_info(&mut self, offset: u64, length: u64)
Set hint stream offset and length.
Sourcepub fn set_end_of_first_page(&mut self, offset: u64)
pub fn set_end_of_first_page(&mut self, offset: u64)
Set end of first page offset.
Sourcepub fn set_main_xref_offset(&mut self, offset: u64)
pub fn set_main_xref_offset(&mut self, offset: u64)
Set main cross-reference table offset.
Sourcepub fn params(&self) -> &LinearizationParams
pub fn params(&self) -> &LinearizationParams
Get the linearization parameters.
Sourcepub fn hint_tables_mut(&mut self) -> &mut HintTables
pub fn hint_tables_mut(&mut self) -> &mut HintTables
Get mutable access to hint tables.
Sourcepub fn build_params_object(&self) -> Object
pub fn build_params_object(&self) -> Object
Build the linearization parameter dictionary object.
Sourcepub fn build_hint_stream(&self) -> Vec<u8> ⓘ
pub fn build_hint_stream(&self) -> Vec<u8> ⓘ
Build the hint stream data.
Auto Trait Implementations§
impl Freeze for LinearizedPdfBuilder
impl RefUnwindSafe for LinearizedPdfBuilder
impl Send for LinearizedPdfBuilder
impl Sync for LinearizedPdfBuilder
impl Unpin for LinearizedPdfBuilder
impl UnwindSafe for LinearizedPdfBuilder
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