Skip to main content

PdfState

Struct PdfState 

Source
pub struct PdfState {
Show 38 fields pub page_images: Vec<u32>, pub objects: BTreeMap<i32, PdfObject>, pub catalog: Vec<u8>, pub open_action: Option<i32>, pub info: Vec<u8>, pub names: Vec<u8>, pub trailer: Vec<u8>, pub outlines: Vec<Outline>, pub glyph_to_unicode: Vec<(Vec<u8>, Vec<u8>)>, pub colorstacks: Vec<ColorStack>, pub last_obj: i32, pub last_annot: i32, pub last_link: i32, pub counter: Rc<Cell<u32>>, pub kinds: HashMap<i32, ObjKind>, pub page_refs: HashMap<i32, i32>, pub fonts: HashMap<u32, (u32, i32)>, pub font_attrs: HashMap<u32, Vec<u8>>, pub map_entries: Vec<Vec<u8>>, pub lua: LuaPdfTexts, pub retval: i32, pub pos: (i32, i32), pub late: Option<LateLuaContext>, pub page_annots: Vec<i32>, pub output_opened: bool, pub dests: HashMap<DestId, DestEntry>, pub dest_order: Vec<DestId>, pub struct_dests: HashMap<DestId, DestEntry>, pub threads: Vec<(DestId, i32)>, pub page: PageItems, pub pending: Vec<PdfObject>, pub doc: DocItems, pub fatal: bool, pub objstm_stats: (u32, u32), pub stream_written: bool, pub obj_words: usize, pub map_note_done: bool, pub active_links: Vec<ActiveLink>,
}
Expand description

Document-level PDF state.

Fields§

§page_images: Vec<u32>

Images written while shipping the current page, in order of first use: their file names are printed at the end of the page.

§objects: BTreeMap<i32, PdfObject>

Objects by PDF object number.

§catalog: Vec<u8>

\pdfextension catalog text.

§open_action: Option<i32>

The catalog’s open action (object number).

§info: Vec<u8>

\pdfextension info text.

§names: Vec<u8>

\pdfextension names text.

§trailer: Vec<u8>

\pdfextension trailer text.

§outlines: Vec<Outline>

Outline entries in order.

§glyph_to_unicode: Vec<(Vec<u8>, Vec<u8>)>

\pdfextension glyphtounicode pairs.

§colorstacks: Vec<ColorStack>

Colour stacks; stack 0 is the predefined colour stack.

§last_obj: i32

\pdffeedback lastobj.

§last_annot: i32

\pdffeedback lastannot.

§last_link: i32

\pdffeedback lastlink.

§counter: Rc<Cell<u32>>

The highest object number allocated so far, shared with the PDF writer.

§kinds: HashMap<i32, ObjKind>

The kind of each allocated object number.

§page_refs: HashMap<i32, i32>

Page object numbers by page number (forward references included).

§fonts: HashMap<u32, (u32, i32)>

PDF fonts (resource name number, object number) by font, see Engine::pdf_font.

§font_attrs: HashMap<u32, Vec<u8>>

\pdfextension fontattr and pdf.setfontattributes texts by font.

§map_entries: Vec<Vec<u8>>

Map files and map lines (pdf.mapfile, pdf.mapline, \pdfextension mapfile/mapline), in order.

§lua: LuaPdfTexts

Texts set from Lua.

§retval: i32

\pdffeedback retval.

§pos: (i32, i32)

The position (PDF coordinates, sp) of the last \latelua, for pdf.getpos.

§late: Option<LateLuaContext>

The \latelua being executed, if any.

§page_annots: Vec<i32>

Annotations registered from Lua for the page being shipped.

§output_opened: bool

Whether pdf.obj opened the output file (in DVI mode LuaTeX then leaves an empty DVI file when no page is shipped out).

§dests: HashMap<DestId, DestEntry>

Destinations by identifier.

§dest_order: Vec<DestId>

Destination identifiers in the order their numbers were allocated.

§struct_dests: HashMap<DestId, DestEntry>

Structure destinations by identifier (\pdfextension dest struct).

§threads: Vec<(DestId, i32)>

Threads referred to by actions: identifier and object number.

§page: PageItems

The interactive items of the page being shipped.

§pending: Vec<PdfObject>

Objects to write as soon as the backend is available again (they were written during shipout, while the backend is busy).

§doc: DocItems

Document-level items for the backend, computed at the end.

§fatal: bool

A fatal backend error occurred: no PDF is written.

§objstm_stats: (u32, u32)

Objects written into object streams and the number of streams.

§stream_written: bool

Whether a stream (form, image or stream object) was written immediately: with no pages, LuaTeX then fails at the end (“already written content discarded”).

§obj_words: usize

Words of extra memory LuaTeX reports for objects (see Engine::pdf_define_object).

§map_note_done: bool

Whether the font map note ({…/pdftex.map}) was printed.

§active_links: Vec<ActiveLink>

Links started but not ended yet, innermost last.

Implementations§

Source§

impl PdfState

Source

pub fn max_obj(&self) -> i32

The highest object number allocated so far.

Source

pub fn named_dests(&self) -> usize

The number of named destinations (for the PDF statistics).

Trait Implementations§

Source§

impl Clone for PdfState

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PdfState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PdfState

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.