Emit native PDF page resources and named transparency states
This commit is contained in:
1 parent
2bced813a2
commit
4f4a4567ea
23 files changed
+791
-37
No files matched your search
@@ -319,6 +319,9 @@ pub enum Primitive {
|
||||
Rpcode,
|
||||
Efcode,
|
||||
Pdffontexpand,
|
||||
Pdfobj,
|
||||
Pdfrefobj,
|
||||
Pdflastobj,
|
||||
}
|
||||
|
||||
impl Primitive {
|
||||
@@ -611,6 +614,8 @@ pub struct State {
|
||||
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>>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub(super) pdf_objects: Option<Box<crate::pdf_device::page_resources::PdfObjects>>,
|
||||
pub(super) pdf_info: Vec<u8>,
|
||||
pub(super) glyph_unicode: crate::pdf_unicode::GlyphUnicodeMap,
|
||||
pub(super) hyphenation: super::hyphenation::HyphenationData,
|
||||
@@ -712,6 +717,7 @@ impl Default for State {
|
||||
output_mode_set: None,
|
||||
pdf_file_options: None,
|
||||
pdf_catalog: None,
|
||||
pdf_objects: None,
|
||||
pdf_info: Vec::new(),
|
||||
glyph_unicode: crate::pdf_unicode::GlyphUnicodeMap::default(),
|
||||
hyphenation: super::hyphenation::HyphenationData::default(),
|
||||
@@ -937,6 +943,9 @@ impl Default for State {
|
||||
#[cfg(all(target_os = "linux", target_env = "gnu"))]
|
||||
("pdflastmatch", Pdflastmatch),
|
||||
("pdfcolorstackinit", Pdfcolorstackinit),
|
||||
("pdfobj", Pdfobj),
|
||||
("pdfrefobj", Pdfrefobj),
|
||||
("pdflastobj", Pdflastobj),
|
||||
("pdfcolorstack", Pdfcolorstack),
|
||||
("pdfsave", Pdfsave),
|
||||
("pdfstartlink", Pdfstartlink),
|
||||
@@ -1334,6 +1343,7 @@ impl State {
|
||||
self.output_mode_set = None;
|
||||
self.pdf_file_options = None;
|
||||
self.pdf_catalog = None;
|
||||
self.pdf_objects = None;
|
||||
self.pdf_info.clear();
|
||||
self
|
||||
}
|
||||
@@ -1348,6 +1358,7 @@ impl State {
|
||||
generate_unicode: self.parameter(Parameter::Pdfgentounicode).width(),
|
||||
glyph_unicode: &self.glyph_unicode,
|
||||
catalog: self.pdf_catalog.as_deref(),
|
||||
objects: self.pdf_objects.as_deref(),
|
||||
info: crate::pdf_device::PdfInfo {
|
||||
entries: &self.pdf_info,
|
||||
date: (self.parameter(Parameter::Pdfinfoomitdate).width() == 0)
|
||||
|
||||
Reference in new issue
Block a user