Skip to main content
Participating Frequently
October 21, 2017
Question

event.target.buttonImportIcon(); command and images with alpha

  • October 21, 2017
  • 2 replies
  • 639 views

Hello everybody. Im creating an interactive pdf with buttons that can replace images using event.target.buttonImportIcon(); command. Some of these images are .png, so they have an alpha (transparency). The problem is that the replaced images with this command appears without alpha, and inserts white instead of transparency.

is there any way to insert .png images with their alpha? thanks!

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
October 21, 2017

I've never seen that happen, and I've imported lots of images with alpha settings. Either your imported image is not transparent as you think, or the button has a background color.

It you do not believe that either of these are the case, the post your file where I can download it and I'll take a look.

Also, include the version and type of Acrobat you are using.

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Legend
October 21, 2017

Probably better to make these replacements PDF.