#1 2016-11-16 04:34:54

Genery
Member
Registered: 2016-11-14
Posts: 4

TPngImage on TPdfDocumentGDI.VCLCanvas

Hello,

Trying to draw partially transparent TPngImage on TPdfDocumentGDI.VCLCanvas using TPngImage.Draw. Transparent points are black in resulting PDF. What is the correct way to put partially transparent PNG to PDF?

-Dmitry

Offline

#2 2016-11-16 09:20:54

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: TPngImage on TPdfDocumentGDI.VCLCanvas

There is no transparency support for the bitmaps of the library, yet.
This is a hard-to-implement feature at PDF level.

The workaround is
- to make manual transparency (i.e. render the part of the page in a separated bitmap, then draw it on the pdf),
- or - even better - write the image as vectorial WMF/EMF instead of bitmap.

Offline

#3 2016-11-16 11:02:40

Genery
Member
Registered: 2016-11-14
Posts: 4

Re: TPngImage on TPdfDocumentGDI.VCLCanvas

I see. Thank you!

Offline

Board footer

Powered by FluxBB