Copy link to clipboard
Copied
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
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thank you Jongware.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now