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: LuaPdfTextsTexts 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: boolWhether 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: PageItemsThe 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: DocItemsDocument-level items for the backend, computed at the end.
fatal: boolA fatal backend error occurred: no PDF is written.
objstm_stats: (u32, u32)Objects written into object streams and the number of streams.
stream_written: boolWhether 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: usizeWords of extra memory LuaTeX reports for objects (see
Engine::pdf_define_object).
map_note_done: boolWhether the font map note ({…/pdftex.map}) was printed.
active_links: Vec<ActiveLink>Links started but not ended yet, innermost last.