Skip to content

Base64 encoded PNG content in SVG plots is not rendered in all PDF viewers #4901

Closed

Description

@sonovice

Description

The following SVG file contains elements such as

<image id="image6" width="237" height="225" xlink:href="data:image/png;base64,iVBORw0KGg ... ">

36_bin_cqt.svg.zip (zipped to prevent rendering in browser)

These PNGs are not shown when opening the PDF with Apple's Preview app or other widely used PDF viewers such as Skim or even the Safari Browser. Chrome and Firefox (so PDF.js-based readers) have no such issues.

How it should look like:
image

What I get with most viewers (at least on my Mac):
image

Reproduction URL

No response

Operating system

macOS

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Sep 5, 2024
  2. LaurenzV commented on Sep 5, 2024

    @LaurenzV
    Collaborator

    It's an Apple-specific bug, that's why it doesn't work in Safari/Preview/Skim, as they all rely on the same PDF engine (Quartz). It works fine on every other viewer (yellow is Quartz):

    typst-0

    With that said, I have known about this bug for a while now, and I haven't found a way to work around it with how we the current SVG embeddal works in Typst...

  3. added
    pdf
    upstream
    on Sep 5, 2024
  4. added
    svg
    on Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpdfsvgupstream

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions