Apply pdfTeX version policy at PDF image declaration
This commit is contained in:
1 parent
1fe0ac9dd5
commit
4c532f9396
9 files changed
+204
-50
No files matched your search
@@ -788,6 +788,8 @@ pub struct State {
|
||||
/// TeX prepare_mag freeze, independent of ordinary grouping/assignments.
|
||||
pub(super) magnification_set: Option<i32>,
|
||||
pub(super) output_mode_set: Option<i32>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub(super) pdf_header_options: Option<crate::pdf_device::PdfHeaderOptions>,
|
||||
pub(super) pdf_file_options: Option<crate::pdf_device::PdfFileOptions>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub(super) pdf_copy_imported_fonts: Option<bool>,
|
||||
@@ -993,6 +995,7 @@ impl Default for State {
|
||||
pdf_last_position: [0, 0],
|
||||
magnification_set: None,
|
||||
output_mode_set: None,
|
||||
pdf_header_options: None,
|
||||
pdf_file_options: None,
|
||||
pdf_copy_imported_fonts: None,
|
||||
xdv_setup: Default::default(),
|
||||
@@ -1379,6 +1382,13 @@ impl State {
|
||||
self.parameters
|
||||
.insert(Parameter::Pdfpkresolution, ParameterValue::Integer(value));
|
||||
}
|
||||
pub(super) fn migrate_pdf_inclusion_errorlevel(&mut self, value: i32) {
|
||||
// pdfTeX updates the two eqtb values in place, keeping their save levels.
|
||||
self.parameters
|
||||
.insert(Parameter::Pdfinclusionerrorlevel, ParameterValue::Integer(value));
|
||||
self.parameters.remove(&Parameter::Pdfoptionpdfinclusionerrorlevel);
|
||||
}
|
||||
|
||||
/// Explicit host selection of the PDF driver (INITEX itself defaults to
|
||||
/// pdfoutput=0). The source can still assign the real parameter.
|
||||
pub fn with_pdf_output(mut self) -> Self {
|
||||
@@ -1633,6 +1643,7 @@ impl State {
|
||||
self.pdf_last_position = [0, 0];
|
||||
self.magnification_set = None;
|
||||
self.output_mode_set = None;
|
||||
self.pdf_header_options = None;
|
||||
self.pdf_file_options = None;
|
||||
self.pdf_copy_imported_fonts = None;
|
||||
self.xdv_setup = Default::default();
|
||||
|
||||
Reference in new issue
Block a user