Skip navigation
Currently Being Moderated

how to exportfile fileformat.jpg with metadataPreferences?

Mar 25, 2012 9:23 PM

Tags: #indesign #scripting

Hello everyone!!

I'm newbie to Indesign script and I want to write script to export activeDocument to JPG with its metadataPreferences? I don't know it's possible or not? or have any way to do it?

Below is my code:


var exportJpg = function() {

    var saveFile = File.saveDialog("Save your files","*.jpg");

    var mydoc = app.activeDocument;

    app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.MAXIMUM;           

    mydoc.metadataPreferences.description = "It's description to write";   

    mydoc.exportFile(ExportFormat.JPG, saveFile, false);




I wish anyone know and share their knowledge or give comments. Thank you in advance!!


Best Regards;


  • Currently Being Moderated
    Mar 26, 2012 4:52 AM   in reply to kuyseng

    I don't see any options for passing any metadata to the exported *.jpeg You should probably look at adding this later using the XMP library ( covered in the toolkit guide )… If I recall correctly *.pdf will inherit document metadata but that may be it…

    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