Skip to main content

LinearizedPdfBuilder

Struct LinearizedPdfBuilder 

Source
pub struct LinearizedPdfBuilder { /* private fields */ }
Expand description

Builder for creating linearized PDFs.

Implementations§

Source§

impl LinearizedPdfBuilder

Source

pub fn new(num_pages: u32, config: LinearizationConfig) -> Self

Create a new linearized PDF builder.

Source

pub fn set_first_page_object(&mut self, obj_num: u32)

Set the first page object number.

Source

pub fn set_first_page_num(&mut self, page_num: u32)

Set the first page number (for alternate first page display).

Source

pub fn set_file_length(&mut self, length: u64)

Update file length after writing.

Source

pub fn set_hint_stream_info(&mut self, offset: u64, length: u64)

Set hint stream offset and length.

Source

pub fn set_end_of_first_page(&mut self, offset: u64)

Set end of first page offset.

Source

pub fn set_main_xref_offset(&mut self, offset: u64)

Set main cross-reference table offset.

Source

pub fn params(&self) -> &LinearizationParams

Get the linearization parameters.

Source

pub fn hint_tables_mut(&mut self) -> &mut HintTables

Get mutable access to hint tables.

Source

pub fn build_params_object(&self) -> Object

Build the linearization parameter dictionary object.

Source

pub fn build_hint_stream(&self) -> Vec<u8>

Build the hint stream data.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Ungil for T
where T: Send,