Skip to content

Transparent background in PDF image is rasterized as white #7235

Closed

Description

@Enivex

Description

If I embed a pdf image with a transparent background, that background is correctly transparent when exporting to svg and pdf, but not png. It turns white instead. Presumably this may be an upstream issue in Hayro @LaurenzV .

(I cannot share the image in question, but I can't imagine it's specific to this one image.)

Reproduction URL

No response

Operating system

No response

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    pdf
    on Oct 27, 2025
  2. LaurenzV commented on Oct 27, 2025

    @LaurenzV
    Collaborator

    Oh yeah, right now we always apply a white background… I forgot about this, but should be easy enough to fix.

  3. added
    visualize
    on Oct 27, 2025
  4. changed the title [-]Transparent background in pdf is rasterized as white[/-] [+]Transparent background in PDF image is rasterized as white[/+] on Oct 27, 2025
  5. xkevio commented on Dec 2, 2025

    @xkevio
    SponsorContributor

    Once LaurenzV/hayro#523 is merged and the hayro version is bumped in typst, this would be resolved!

  6. Matt-Ord commented on Feb 2, 2026

    @Matt-Ord

    I'm facing the same issue too, when I try to add the pdf image attached.
    Has this already been fixed - i'm guessing it will take a while to be pushed to typst.app?

    polarization_efficiency (1).pdf

  7. LaurenzV commented on Feb 2, 2026

    @LaurenzV
    Collaborator

    It’s not fixed yet but it can be fixed in the next version.

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

    bugpdfvisualize

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions