3 Replies Latest reply on Aug 6, 2012 8:21 AM by gkaiseril

    jscript project


      I am new to the world of jscript and Adobe. I currently use Adobe 8 Pro.  In reading the jscript api, it would appear to me that I should be able to program jscript to solve a problem I have. Assume I have 10 pdf files each with 10 pages more or less. Further assume that I have 5 annotations (which change from project to project). My goal is to have jscript create a new pdf file which "summarizes" all of the tags that have been placed in the other 10 files.

      My "pseudo code" would be:

      Ask me for my 5 annotations (or read them from a file)

      Browse for a group of files to be annotated (Multiple selection of 10 files from dialog)

      Open all files.

      Allow me to page through each file, marking annotations as I go. Ideally, I could right click on a page and then select from one of the 5 annotations.

      Since some annotations may span multiple pages in a document, I would want a way to easily specify that the annotation spanned multiple pages. Also I will want to be able to put multiple annotations on some pages.

      Save "Annotated" version of all files

      Create new Summary file containing my list of annotations followed by the document name and page numbers of the annotations.

      Can someone please point me in the proper direction as for as coding examples go? All help would be greatly appreciated!

        • 1. Re: jscript project
          Dave Merchant MVP & Adobe Community Professional

          That exact workflow is not something you could do with scripting - the JSAPI has no ability to drive asynchronous parts of the user interface (it cannot "watch" as you apply comments to a file) and has only very basic support for dialogs. You can create a PDF Report of the comments within a file using an application-level script, but you would have to identify your annotations via one of the default properties (author name, date, color, etc.) instead of tracking them as they're placed.


          Annotations in PDF files cannot span pages (nothing can - every object in the PDF content stream is defined by a single page number and a position rectangle). Try drawing a markup shape or highlight past a page boundary and you'll find Acrobat simply won't allow it.

          • 2. Re: jscript project
            TechyAtty Level 1

            Thanks for the response, I really appreciate it.  What I'm trying to do is to be able to automate responding to discovery in a lawsuit.  Opposing counsel sends me a list of "Requests for Discovery" which are broad categorries of documents which I must "Produce" back to them.  The rules state that I must individually identify which documents are responsive to each of their requests.  Many times, 1 document may be responsive to several different requests.  Let's say I have 10 documents that I know are responsive.  My objective is to in some way "mark" individual pages or range of pages with a "tag", which could be a field or even a stamp.  They do NOT have to be visible (prefer that they are not).  I will typically use the verbage of their Request (or some major part of it) as the "tag".  I will then bundle all of the documents into 1 large 100 page document with a summary page that identifies which parts of the document are responsive to each

            individual request, I assume by sorting the tags.  If it helps, I will have all documents that I know to be responsive, already in a specific folder when I start, so some type of batch processing would be possible.  My example deals with 10 documents, in reality it might be hundreds of documents thus the need to automate.  Thanks again for any insight you can share.


            • 3. Re: jscript project
              gkaiseril MVP & Adobe Community Professional

              You might want to look at the Bates Numbering or some type of automation of placing annotations and creating a summary report of the Annotations.


              Automating Placement of Annotations by Thom Parker


              Bates numbering across a PDF Portfolio using Acrobat 9 by Rick Borstein