Import PNG images in the native PDF device

This commit is contained in:
gloamxun committed 2026-11-21 04:13:18 +08:00
1 parent 297431a547
commit 555a029505
13 files changed
+467 -35

No files matched your search

@@ -77,7 +77,8 @@ pub(crate) fn resolve(
// Custom content or font resources may change the meaning of native
// paint indices. Group composition still uses those same indices.
resource.overrides_paint = local.has(b"Contents") || local.has(b"Resources");
resource.needs_pdf_for_preview |= resource.overrides_paint || local.has(b"Group");
resource.has_page_group = local.has(b"Group");
resource.needs_pdf_for_preview |= resource.overrides_paint || resource.has_page_group;
let supplied_media = supplies_media_box(&resource.attributes);
let media_value = if supplied_media {
@@ -327,6 +327,7 @@ pub struct PageResources {
pub(crate) attributes: Arc<[u8]>,
pub(crate) viewport: Option<super::page_attributes::Viewport>,
pub(crate) overrides_paint: bool,
pub(crate) has_page_group: bool,
pub(crate) opacity: BTreeMap<Vec<u8>, Transparency>,
pub(crate) needs_pdf_for_preview: bool,
}