Render PDF to image renders transparent images as black

Rendering a given PDF, renders the image of the signature as black (I guess the image is a transparent PNG image)test.pdf (104.1 KB)
Test.png (155.0 KB)

 using (Document doc = new Document(@"C:\Test.pdf"))
            PngDevice device = new PngDevice();
            Page page = doc.Pages[1];
            using (MemoryStream ms = new MemoryStream())
                device.Process(page, ms);
                File.WriteAllBytes(@"C:\Test.png", ms.ToArray());

            Resources resources = page.Resources;
            XForm xform = resources.Forms[1];
            Resources xFormResources = xform.Resources;
            XImage xImage = xFormResources.Images[1];
            // Try to extract the problematic image fails, because xImage.ToStream() returns a truncated stream;
            Stream stream = xImage.ToStream();


I have observed issue you mentioned and have logged it as PDFNET-47785 in our issue tracking system. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.