Highlighted

Problem with creating crop marks & bleed

Community Beginner ,
Aug 17, 2020

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);

Adobe Community Professional
Correct answer by brianp311 | Adobe Community Professional

"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;

 

 

Topics

Scripting

Views

64

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Problem with creating crop marks & bleed

Community Beginner ,
Aug 17, 2020

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);

Adobe Community Professional
Correct answer by brianp311 | Adobe Community Professional

"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;

 

 

Topics

Scripting

Views

65

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Aug 17, 2020

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;

 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
tjinnz LATEST
Community Beginner ,
Aug 18, 2020

Copy link to clipboard

Copied

You are a legend!!!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...