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

Code optimise

Engaged ,
Apr 28, 2018 Apr 28, 2018

Dear JS Lovers,

Can anyone optimise my code?

function place_pdf (myStory) {

var myRec = myStory.rectangles;

for(i=0; i<myRec.length; i++){

if(myRec.topLeftCornerOption == CornerOptions.ROUNDED_CORNER &&

myRec.topRightCornerOption == CornerOptions.ROUNDED_CORNER){

app.pdfPlacePreferences.pdfCrop = PDFCrop.CROP_TRIM;

app.pdfPlacePreferences.pageNumber = i+1;

app.pdfPlacePreferences.transparentBackground = true;

myRec.place(myPDF, false)

}

}

}

Kind Regards,

Sumit

-Sumit
TOPICS
Scripting
620
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 , Apr 28, 2018 Apr 28, 2018

Optimise what?

If you think it runs too slow, it must be that final line that takes the most time. And there is no hidden 'faster' way to place a PDF.

Translate
Community Expert ,
Apr 28, 2018 Apr 28, 2018

Optimise what?

If you think it runs too slow, it must be that final line that takes the most time. And there is no hidden 'faster' way to place a PDF.

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
Engaged ,
Apr 29, 2018 Apr 29, 2018
LATEST

Thank you Jongware.

-Sumit
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