top of page

If you have a set of PDFs which attorneys have highlighted to show which excerpts in the documents they want to be redacted, you can run a Javascript in Adobe Acrobat to convert the highlighted text to redactions.


Follow these steps:


  1. In Acrobat, under Tools, open the 'Action Wizard'.


  1. Select 'New Action'


. . . and then add the 'Execute JavaScript' tool. Be sure to uncheck 'Prompt User'



  1. Click on 'Specify Settings' and then add the below script into the Editor:



this.syncAnnotScan();

var annots = this.getAnnots();

if (annots != null) {

    for (var i in annots) {

        var annot = annots[i];

        if (annot.type == "Highlight") {

                                    annot.type = "Redact";

                                    annot.fillColor = color.black

                        }

    }

}

this.applyRedactions();




  1. Next, add a command in the action to save the file.

  1. Under the Save settings, enter a suffix for the new file that will be saved:


  2. Name and save the new action:



  1. When you run the action



. . . it will prompt you to select multiple files







This script will redact highlighting of different colors - not just yellow, but pink, blue, green, or whatever color has been used.





Note that if other text in the PDF has been marked for redaction:




. . . this script will apply those redactions.




These days it's widely appreciated not only among litigation support professionals, but also among attorneys and law firm employees in general, that generative AI can quickly and reliably perform many common tasks such as document review or document summarization which previously would have taken many hours to complete.


Here's a demonstration of just how easy it is to use Microsoft's Copilot AI to review data in an Excel file, and the content of a set of PDFs.


This is a .csv file containing baseball batting statistics from 1871 to 2023, which can be downloaded here.



If you simply upload the file to copilot and ask a general question, it can give you an accurate example. In this example, you can see that I have asked about the number of home runs hit by players for the New York Mets, but I have not specified the abbreviation used for this team ("NYN"), or the abbreviation used for a home run ("HR") used in the .csv file.


. . . and yet still copilot gives me accurate results. Note that it uses the abbreviations for player names used in the Batting.csv source file - so it's not getting the information from a general knowledge set.



It can also easily generate a visualization of the search results like this bar graph:



. . . and will upon request modify the chart to show the data according to a different metric.


Copilot may be very literal in interrupting the instructions you give it. Here when I asked for a list of players hitting higher than .400 in a season it included players with very few at bats.



. . .however it prompted me to give more specific instructions. Keep in mind that batting averages are not actually listed in the source data - copilot knows to perform the calculation by dividing the number of hits by the number of at bats.




Copilot also gives you the option to export the results from any operation it performs:



You will get your own Excel file to work with.



I also tested how copilot performed analyzing multiple document PDFs using trial exhibits from the Enron litigation which are available on the DOJ's web site: https://www.justice.gov/archive/index-enron.html


Copilot did not do a good job OCRing the PDFs - the supposedly text-searchable PDFs that it generated were actually files with blank pages.



The free version of copilot will only allow you to upload 3 files at once.



When I asked it to tell me the dates of three PDFs - each of a different document type - it not only gave me the correct dates, but also provided an accurate summary of each document without being asked to.



Note how for the PDF named, 'EXH063-00292.pdf' it's able to correctly identify the author and the pinpoint purpose of the letter.





 
 

Keep in mind when you're drafting a PowerShell script that if any of the filepaths referenced in it contain beginning or ending brackets, the script will fail. So if we set up a simple copy-item script like this in Excel:

. . . which copies files from one location to a new one, renamed with a new filename, but the filepaths include a bracketed word, the script will fail without giving an error message that something is wrong.



The files in the first location are simply not copied to the new folder at all, and no error message flags the problem in the PowerShell blue console at the bottom.


We can get around this problem by adding a backtick ` in front of each beginning and ending bracket in the script. (Be sure to use a backtick and not an apostrophe.) You can enter a backtick by pressing ALT + 096. If your filepath is listed in double quotes, use two backticks in front of each bracket; if the path is enclosed in single quotes use just one backtick.




So the updated script will look like this:

copy-item -Path "C:\foofolder\test\powershell\Exhibit 001.pdf" -Destination "C:\foofolder\test\powershell\Exhs A to Z\Exhibit A.pdf"

copy-item -Path "C:\foofolder\test\powershell\Exhibit 002 ``[redacted``].pdf" -Destination "C:\foofolder\test\powershell\Exhs A to Z\Exhibit B.pdf"

copy-item -Path "C:\foofolder\test\powershell\Exhibit 003.pdf" -Destination "C:\foofolder\test\powershell\Exhs A to Z\Exhibit C.pdf"

copy-item -Path "C:\foofolder\test\powershell\Exhibit 004 ``[redacted``].pdf" -Destination "C:\foofolder\test\powershell\Exhs A to Z\Exhibit D.pdf"

copy-item -Path "C:\foofolder\test\powershell\Exhibit 005.pdf" -Destination "C:\foofolder\test\powershell\Exhs A to Z\Exhibit E.pdf"

copy-item -Path "C:\foofolder\test\powershell\Exhibit 006 ``[redacted``].pdf" -Destination "C:\foofolder\test\powershell\Exhs A to Z\Exhibit F.pdf"

copy-item -Path "C:\foofolder\test\powershell\Exhibit 007.pdf" -Destination "C:\foofolder\test\powershell\Exhs A to Z\Exhibit G.pdf"

copy-item -Path "C:\foofolder\test\powershell\Exhibit 008 ``[redacted``].pdf" -Destination "C:\foofolder\test\powershell\Exhs A to Z\Exhibit H.pdf"

copy-item -Path "C:\foofolder\test\powershell\Exhibit 009.pdf" -Destination "C:\foofolder\test\powershell\Exhs A to Z\Exhibit I.pdf"

copy-item -Path "C:\foofolder\test\powershell\Exhibit 010 ``[redacted``].pdf" -Destination "C:\foofolder\test\powershell\Exhs A to Z\Exhibit J.pdf"


. . . and give you the result you wanted:



Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

​

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

​

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page