Skip to content

Indexed PNG with transparency is embedded but renders invisible #392

Open

Description

@hippasus

Summary

When drawing an indexed/palette PNG with transparency (tRNS) onto an existing PDF page using XGraphics.DrawImage, PDFsharp 6.2.4 or 7.0.0-preview-1 produces an output PDF that contains the image XObject, but the image is not visible when rendered on macOS. If the exact same image is first converted to RGBA PNG, the image renders visibly.

Environment

  • PDFsharp: 6.2.4
  • Target framework tested: net10.0
  • OS tested: macOS
  • Renderer used to verify: macOS sips / Preview-style rendering

Issue.zip

Activity

  1. ThomasHoevel commented on Sep 28, 2026

    @ThomasHoevel
    Member

    As far as I can tell, PDFsharp creates a correct PDF file and Adobe Reader show it correctly, but MacOS Quartz ignores the PDF specification and shows the image incorrectly. We'll discuss what we can do about it.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions