Answered
pdf export with jsx script
hi all
I want to create to pdf of my indd doc using job options preset.
One pdf is hires and the other low res.
this is my MAC OS script:
var doc = app.activeDocument;
var filePath = doc.filePath;
// Impostazioni job options
var pressQualityJobOptions = File("/Library/Application Support/Adobe/Adobe PDF/Settings/Press Quality.joboptions");
var lightJobOptions = File("/Library/Application Support/Adobe/Adobe PDF/Settings/versione light.joboptions");
// Esporta il PDF con le impostazioni "Press Quality"
var pdfPressQuality = app.pdfExportPresets.itemByName("Press Quality");
doc.exportFile(ExportFormat.pdfType, File(filePath + "/" + doc.name.replace(/\.[^\.]+$/, '') + ".pdf"), false, pdfPressQuality, pressQualityJobOptions);
// Esporta il PDF con le impostazioni "versione light"
var pdfLight = app.pdfExportPresets.itemByName("versione light");
doc.exportFile(ExportFormat.pdfType, File(filePath + "/" + doc.name.replace(/\.[^\.]+$/, '') + " light.pdf"), false, pdfLight, lightJobOptions);
when I run the script I receive this msg:
JavaScript Error!
Codice errore: 30477
Stringa errore: Valore non valido per il parametro "using" del metodo
"exportFile". Era previsto PDFExportPreset, ma è stato ricevuto nothing.
Motore: main
File: /Users/macstudio01/Library/Preferences/Adobe InDesign/
Version 18.0/it IT/Scripts/Scripts Panel / mio script PDF.is>
Riga: 11
Sorgente: doc.exportFile(ExportFormat.pdfType, File(filePath + "/" +
doc.name.replace(/\.[^\.]+ $/, ") + "pdf"), false, pdfPressQuality,
pressQualityJobOptions);it seems script cant locate the job options
could you help me please?
thx
