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

PageRange in Place options

New Here ,
Mar 17, 2011 Mar 17, 2011

Hi Friends,

               How can assign page range for place option in InDesign java script..

Thanks,

Divya.

TOPICS
Scripting
736
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 Expert ,
Mar 17, 2011 Mar 17, 2011

Do you want to place PDF pages?  You can set pdfPlacePreferences.

app.pdfPlacePreferences.pageNumber = pageNumber;

Sample code is below...

var tgt = app.activeDocument;
var fNm = File.openDialog("select PDF file");
var f = new File (fNm);

for(i=0;i<10;i++){
    app.pdfPlacePreferences.pageNumber = i+1;
    app.pdfPlacePreferences.pdfCrop = PDFCrop.CROP_MEDIA;
    var rect = tgt.pages.rectangles.add();
   
    rect.place(f);
    rect.geometricBounds=[0,0,297,210];
    rect.fit(FitOptions.CENTER_CONTENT);
    }


Ten wrote.

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
New Here ,
Mar 17, 2011 Mar 17, 2011

          Thanks a lot Friend.. its working fine...

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 Expert ,
Mar 18, 2011 Mar 18, 2011
LATEST

So mark your question as anwered, then.

answer.PNG

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