Emit native PDF literals at scan and shipout boundaries

This commit is contained in:
gloamxun committed 2026-11-21 02:03:25 +08:00
1 parent 13ab32247d
commit 432c1d2ba7
21 files changed
+264 -61

No files matched your search

@@ -614,6 +614,19 @@ impl Printer<'_> {
LinkNode::Destination { .. } => "pdfdest",
});
}
OutputOperation::PdfLiteral { mode, shipout, tokens } => {
use crate::pdf_device::PdfLiteralMode;
self.command("pdfliteral");
if *shipout {
self.literal(" shipout");
}
match mode {
PdfLiteralMode::Origin => {}
PdfLiteralMode::Page => self.literal(" page"),
PdfLiteralMode::Direct => self.literal(" direct"),
}
self.tokens(tokens)?;
}
OutputOperation::PdfSetMatrix(tokens) => {
self.command("pdfsetmatrix");
self.tokens(tokens)?;