1 Reply Latest reply on Nov 5, 2015 6:58 AM by try67

    I would like to add bookmarks based on original file name when combining PDFs using Javascript.

    erics26909219

      I am combining hundreds of original 1-page PDF's into dozens of PDF's. I have generated JavaScript to do this. However, I would like to add bookmarks for some of the pages, based on the name of the original file name of that page. Here is a sample of my combining script:

       

      var currDoc = app.openDoc ("C:/Report/December 2015/Insert Plan SD.PDF");

      currDoc.insertPages ({nPage: -1, cPath: "C:/Report/December 2015/RPM/K001 RPM.PDF"});

      currDoc.insertPages ({nPage: -1, cPath: "C:/Report/December 2015/output/K001 ROCHESTER.PDF"});

      currDoc.insertPages ({nPage: -1, cPath: "C:/Report/December 2015/Insert Plan.PDF"});

      currDoc.insertPages ({nPage: -1, cPath: "C:/Report/December 2015/RPM/L002 RPE.PDF"});

      currDoc.insertPages ({nPage: -1, cPath: "C:/Report/December 2015/output/L002 BOSTON.PDF"});

      currDoc.insertPages ({nPage: -1, cPath: "C:/Report/December 2015/Maps/10_Map3.PDF"});

      currDoc.insertPages ({nPage: -1, cPath: "C:/Report/December 2015/Maps/10_Map2.PDF"});

      currDoc.insertPages ({nPage: -1, cPath: "C:/Report/December 2015/Maps/10_Map1.PDF"});

      currDoc.insertPages ({nPage: -1, cPath: "C:/Report/December 2015/Comp Brand/10_KReport1.PDF"});

      currDoc.insertPages ({nPage: -1, cPath: "C:/Report/December 2015/Comp Brand/10_LReport1.PDF"});

      currDoc.saveAs({ cPath: "C:/Report/December 2015/Final/Area 10 2015 Review.PDF"});

      currDoc.closeDoc(true);