2 Replies Latest reply on Feb 2, 2010 1:28 PM by kentgbaker

    get numPages from a closed pdf???

    kentgbaker

      Hi All,

       

      I am already using app.broweForDoc to select a source file for a script. Is there any way for me to get the number of pages in the source file that remains closed?

       

      I need this to verify that the source doc and the open doc have the same number of pages. I intend to put a catch in if this.numPages does not equal the numPages of the source doc.

       

      As always, I appreciate any help

       

      var oRtn = app.browseForDoc();
      strPath = oRtn.cPath;
      var numpages = this.numPages;
      for (var i=0; i < numpages; i++)
      this.addWatermarkFromFile({
      cDIPath:strPath,
      nSourcePage: i,
      nStart:i,
      nHorizAlign: app.constants.align.left,
      nVertAlign: app.constants.align.top,
      nHorizValue: 144, nVertValue: -37,})