Restore XeTeX picture boxes at native shipout
This commit is contained in:
1 parent
c2f18f50dc
commit
9da2ee41cd
7 files changed
+308
-35
No files matched your search
@@ -413,6 +413,7 @@ impl Executor {
|
||||
let mut has_explicit_space = false;
|
||||
let mut pdf_objects = Vec::new();
|
||||
let mut xdv_annotations = std::collections::BTreeMap::new();
|
||||
let mut reopened_images = false;
|
||||
for (index, output) in outputs.into_iter().enumerate() {
|
||||
while font_uses.peek().is_some_and(|usage| usage.before_output == index) {
|
||||
self.current = current;
|
||||
@@ -604,6 +605,9 @@ impl Executor {
|
||||
LinkNode::Running(_) | LinkNode::Destination { .. } => {}
|
||||
}
|
||||
} else {
|
||||
if let OutputOperation::PdfImage { image, .. } = &output.operation {
|
||||
reopened_images |= image.xdv.is_some() && image.image.is_metadata_only();
|
||||
}
|
||||
self.output_node(output, files)?;
|
||||
}
|
||||
}
|
||||
@@ -650,6 +654,9 @@ impl Executor {
|
||||
links.xdv_destinations = std::mem::take(&mut shipout.pdf_links.xdv_destinations);
|
||||
shipout.pdf_links = links;
|
||||
}
|
||||
if reopened_images {
|
||||
self.rebind_shipped_format_images(&mut shipout.box_node)?;
|
||||
}
|
||||
if xdv && (!xdv_annotations.is_empty() || self.xdv_annotations.is_active()) {
|
||||
shipout.pdf_links.xdv_annotations = self.ship_xdv_annotations(&shipout, &xdv_annotations, files)?;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user