Problem with creating crop marks & bleed

Community Beginner ,
Aug 17, 2020 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);

TOPICS
Scripting

Views

124

Likes

translate

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
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Aug 17, 2020 Aug 17, 2020
"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...

Likes

translate

Translate

Translate
Adobe Community Professional ,
Aug 17, 2020 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

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
community guidelines
Community Beginner ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

You are a legend!!!

Likes

translate

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
community guidelines