1 Reply Latest reply on Mar 18, 2009 12:13 AM by try67

    Crop PDF's using margin inputs from a database

    Level 1
      I am trying to create a batch sequence in Acrobat 9. I want to crop a series of pdf files using different input parameters. Is there a way to read in the margins (top, bottom, left, right) or x,y coordinates from an access database (or excel or csv or xml)?

      I would like to use Javascript code, using variables.

      Any help would be appreciated.
        • 1. Re: Crop PDF's using margin inputs from a database
          try67 MVP & Adobe Community Professional
          The 3 sources you mentioned are very different.
          1) Database - You can connect to a database using the ADBC object. More info can be found in the reference files.
          2) CSV - I think the best way to read it is by importing it as a DataObject and then reading it using a ReadStream. Look in the reference for doc.getDataObjectsContents().
          3) Excel - Depends which type of file it is. If it's a delimited plain-text file you can handle it like a CSV file. If not, I don't think it's possible to read it using JavaScript, since you need to have OLE access to Excel itself.