Read file-backed PDF objects at their actual write boundary
This commit is contained in:
1 parent
4f4a4567ea
commit
a958954308
5 files changed
+139
-17
No files matched your search
@@ -310,8 +310,16 @@ impl Executor {
|
||||
} else {
|
||||
Vec::new().into_iter()
|
||||
};
|
||||
let mut pdf_objects = Vec::new();
|
||||
for output in outputs {
|
||||
if let OutputOperation::PdfColor { stack, action } = &output.operation {
|
||||
if let OutputOperation::PdfObject(number) = output.operation {
|
||||
self.current = output.span;
|
||||
self.tick()?;
|
||||
if device.pdf.is_none() {
|
||||
return self.fail("cannot ship a PDF object reference to DVI");
|
||||
}
|
||||
pdf_objects.push((number, output.span));
|
||||
} else if let OutputOperation::PdfColor { stack, action } = &output.operation {
|
||||
if device.pdf.is_none() {
|
||||
return self.fail("cannot ship a PDF color operation to DVI");
|
||||
}
|
||||
@@ -363,6 +371,10 @@ impl Executor {
|
||||
*span,
|
||||
));
|
||||
}
|
||||
for (number, span) in pdf_objects {
|
||||
self.current = span;
|
||||
self.write_pdf_object(number, files)?;
|
||||
}
|
||||
let pdf_links = if has_link_material {
|
||||
self.ship_pdf_link_material(&b, &device, &pdf_graphics_steps, files)?
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user