Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Problem with creating crop marks & bleed

Community Beginner ,
Aug 17, 2020 Aug 17, 2020

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
452
Translate
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

Community Expert , 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

...
Translate
Community Expert ,
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 defining currentPDFFile at some point. You also want to turn bleedMarks on in your with statement: 

 

bleedMarks = true;

 

 

Translate
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
LATEST

You are a legend!!!

Translate
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