Copy link to clipboard
Copied
Hi,
I'm trying to export PDF file with crop marks & bleed using below javascript, but, the exported PDF file doesn't have crop marks & bleed at all. Could you please let me know what I've missed in the scripts? thanks heaps.
var currentPDFFile;
var myPDFExportPreset = app.pdfExportPresets.item("[Press Quality]");
with(app.pdfExportPreferences) {
pageRange = "1";
cropMarks = true;
useDocumentBleedWithPDF = true;
}
app.activeDocument.exportFile(ExportFormat.pdfType, currentPDFFile, false, myPDFExportPreset);
"Press Quality" doesn't have those things set, and the preset settings are wiping out whatever you set in the code.
You could either save a preset with the Press Quality settings plus those settings and call that in line 2, or you can add this after the second line:
app.pdfExportPreferences.properties = myPDFExportPreset.properties;
Then remove the preset from your export method call:
app.activeDocument.exportFile(ExportFormat.pdfType, currentPDFFile, false);
I assume you are defini
...Copy link to clipboard
Copied
"Press Quality" doesn't have those things set, and the preset settings are wiping out whatever you set in the code.
You could either save a preset with the Press Quality settings plus those settings and call that in line 2, or you can add this after the second line:
app.pdfExportPreferences.properties = myPDFExportPreset.properties;
Then remove the preset from your export method call:
app.activeDocument.exportFile(ExportFormat.pdfType, currentPDFFile, false);
I assume you are defining currentPDFFile at some point. You also want to turn bleedMarks on in your with statement:
bleedMarks = true;
Copy link to clipboard
Copied
You are a legend!!!