Write native PDF catalogs and open actions
This commit is contained in:
1 parent
a53d9c9bf9
commit
f4b003bd27
20 files changed
+811
-40
No files matched your search
@@ -108,6 +108,7 @@ pub enum Primitive {
|
||||
Pdfstartlink,
|
||||
Pdfendlink,
|
||||
Pdfdest,
|
||||
Pdfcatalog,
|
||||
Pdfsetmatrix,
|
||||
Pdfrestore,
|
||||
Pdfglyphtounicode,
|
||||
@@ -594,6 +595,8 @@ pub struct State {
|
||||
pub(super) magnification_set: Option<i32>,
|
||||
pub(super) output_mode_set: Option<i32>,
|
||||
pub(super) pdf_file_options: Option<crate::pdf_device::PdfFileOptions>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub(super) pdf_catalog: Option<Box<crate::pdf_device::catalog::PdfCatalog>>,
|
||||
pub(super) glyph_unicode: crate::pdf_unicode::GlyphUnicodeMap,
|
||||
pub(super) hyphenation: super::hyphenation::HyphenationData,
|
||||
}
|
||||
@@ -634,6 +637,7 @@ impl Default for State {
|
||||
magnification_set: None,
|
||||
output_mode_set: None,
|
||||
pdf_file_options: None,
|
||||
pdf_catalog: None,
|
||||
glyph_unicode: crate::pdf_unicode::GlyphUnicodeMap::default(),
|
||||
hyphenation: super::hyphenation::HyphenationData::default(),
|
||||
};
|
||||
@@ -854,6 +858,7 @@ impl Default for State {
|
||||
("pdfstartlink", Pdfstartlink),
|
||||
("pdfendlink", Pdfendlink),
|
||||
("pdfdest", Pdfdest),
|
||||
("pdfcatalog", Pdfcatalog),
|
||||
("pdfsetmatrix", Pdfsetmatrix),
|
||||
("pdfrestore", Pdfrestore),
|
||||
("pdfglyphtounicode", Pdfglyphtounicode),
|
||||
@@ -1239,6 +1244,7 @@ impl State {
|
||||
self.magnification_set = None;
|
||||
self.output_mode_set = None;
|
||||
self.pdf_file_options = None;
|
||||
self.pdf_catalog = None;
|
||||
self
|
||||
}
|
||||
pub fn is_initex(&self) -> bool {
|
||||
@@ -1251,6 +1257,7 @@ impl State {
|
||||
compression: self.parameter(Parameter::Pdfcompresslevel).width(),
|
||||
generate_unicode: self.parameter(Parameter::Pdfgentounicode).width(),
|
||||
glyph_unicode: &self.glyph_unicode,
|
||||
catalog: self.pdf_catalog.as_deref(),
|
||||
}
|
||||
}
|
||||
/// Job-wide decoding choice; it is not a scoped TeX assignment.
|
||||
|
||||
Reference in new issue
Block a user