Ship named PDF color spaces and patterns from native color stacks

This commit is contained in:
gloamxun committed 2026-11-29 02:35:22 +08:00
1 parent 745c33fd44
commit e9893a5c1b
5 files changed
+123 -6

No files matched your search

+2 -2
View File
@@ -354,11 +354,11 @@ impl DisplayList {
/// Whether this page needs the complete PDF device output for SVG preview.
pub fn has_embedded_pdf(&self) -> bool {
self.pdf_resources.needs_pdf_for_preview
|| self.pdf_background.as_ref().is_some_and(|program| !program.xdv_resources.is_empty())
|| self.pdf_background.as_ref().is_some_and(|program| program.needs_pdf_for_preview())
|| self
.items
.iter()
.any(|item| matches!(item, DisplayItem::PdfColor { program, .. } if !program.xdv_resources.is_empty())
.any(|item| matches!(item, DisplayItem::PdfColor { program, .. } if program.needs_pdf_for_preview())
|| matches!(item, DisplayItem::PdfImage { .. } | DisplayItem::PdfForm { .. }
| DisplayItem::PdfGraphics {
operation: crate::pdf_device::PdfGraphics::Literal { .. },