Honor final pdfTeX font charset and document info omission
This commit is contained in:
1 parent
38c567623a
commit
de481fd762
8 files changed
+92
-26
No files matched your search
@@ -1676,15 +1676,26 @@ impl State {
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn restore_legacy_pdf_omission_parameters(&mut self) {
|
||||
if self.input_profile != super::InputProfile::XeTeX {
|
||||
for parameter in [Parameter::Pdfomitcharset, Parameter::Pdfomitinfodict] {
|
||||
self.commands
|
||||
.entry(CommandName::Control(parameter.name()))
|
||||
.or_insert(Meaning::Parameter(parameter));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_initex(&self) -> bool {
|
||||
self.initex
|
||||
}
|
||||
/// Final font output uses the live table and parameters, not the values
|
||||
/// captured at a page's shipout. The table is global and survives a dump.
|
||||
/// Final PDF output uses the live state after the last page ships out.
|
||||
pub fn pdf_final_options(&self) -> crate::pdf_unicode::PdfFinalOptions<'_> {
|
||||
crate::pdf_unicode::PdfFinalOptions {
|
||||
compression: self.parameter(Parameter::Pdfcompresslevel).width(),
|
||||
generate_unicode: self.parameter(Parameter::Pdfgentounicode).width(),
|
||||
omit_charset: self.parameter(Parameter::Pdfomitcharset).width() != 0,
|
||||
omit_info: self.parameter(Parameter::Pdfomitinfodict).width() != 0,
|
||||
glyph_unicode: &self.glyph_unicode,
|
||||
fonts: &self.fonts,
|
||||
page_tree_attributes: &self.pdf_pages_attributes,
|
||||
|
||||
Reference in new issue
Block a user