Skip to content

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

@sonovice

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpdfRelated to PDF export or PDF embedding.svgAnything about the file format for people who like to have fun.upstreamIssues in dependencies.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions