Set PNG transparency support.
void pdfSetPNGTransparency(PDFHandle pdf, int transparency)
This function enables (if transparency is not zero) or disables (if transparency is zero) generation of an alpha channel in PNG output. The default is disabled.

If transparency is enabled, the PDF rasterizer will be configured to skip the final compositing step (with an opaque background paper color).

NOTE: Transparent PNG output is only useful with PDF files that have been constructed with a transparent background. This parameter is only relevant when pdfWritePageBitmap or pdfWriteRegionBitmap is called with pdfImageFilePNG.

The pdfResetBitmapParams function resets PNG transparency to the default value of disabled.

pdfSetPNGTransparency(pdf, 1);