Skip navigation
Currently Being Moderated

[CS6] Export transparent PNG image in InDesign CS6

Jul 16, 2012 1:03 AM

Tags: #transparent #image #script #export #png #cs6 #pageitem #exportfile #non_transparent

I usually export a page item to a transparent PNG image in InDesign CS5.5 (and below) using the following script:

 

pageItem.exportFile(ExportFormat.pngFormat, exportImageFile);

 

But this script does not work in InDesign CS6: it exports a non-transparent PNG instead. It seems that CS6 adds a new option to decide whether the export PNG image is transparent or not -- and the default value is non-transparent.

 

I've tried to change this option for a transparent PNG but haven't succeeded, can you please help?

 
Replies
  • Currently Being Moderated
    Jul 16, 2012 1:45 AM   in reply to Hoang_Huynh

    app > pngExportPreferences > transparentBackground

    If true, use a transparent background for the exported PNG.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 16, 2012 6:32 AM   in reply to Hoang_Huynh

    Try this:

    app.hostObjectDelegate.pngExportPreferences.transparentBackground = true;
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points