Litigation Support Tip of the Night

January 8, 2020

Evermap has posted the below Javascript here , which is designed to delete blank pages, (blank in the sense that they don't contain any searchable text), from sets of PDFs.  I successfully tested the script tonight.

In order to run the script in Adobe Acrobat go to Tools . . . Action Wizard and click 'Create New Action . . . '.  Under 'More Tools', in the 'Choose tools to add' section, click on 'Execute Javascript', then uncheck 'Prompt User' and click on 'Specify Settings' on the right.  Put the script in the JavaScript Editor . . .


Click OK and save and rename the new action.   Add the files you want to process and then click start. 

A new file will be created for each source file, with the blank pages removed and '_Original' added to the end of the file name. 

// Acrobat JavaScript Code - www.evermap.com
// DELETE PDF PAGES WITHOUT TEXT 
// IMPORTANT: This script assumes that page is blank if it does not contain any "pdf words"
// OUTPUT: An output PDF file is created by appending _Original.pdf to the filename

try {
     var newName = this.path;
     var filename = newName.replace(".pdf","_Original.pdf"); 
     this.saveAs(filename);
     for (var i = 0; i <  this.numPages; i++) 
     {
          numWords = this.getPageNumWords(i);
          if (numWords == 0) 
          {
               // this page has no text, delete it
               this.deletePages(i,i);
          }
     }
}
catch(e)
{
    app.alert(e);
}

December 31, 2019

Tonight, I tested out a Java script posted here by EverMap which is used to extract social security numbers from PDFs.  My test set has SSNs listed in the first page of a short document; in a table in another short document; and hidden in a very long document.  The script found each SSN. 

Enter the below script in Adobe Acrobat by going to Tools . . . Action Wizard and clicking 'Create New Action . . . '.   Under 'More Tools', in the 'Choose tools to add' section, click on 'Execute Javascript', then uncheck 'Prompt User' and click on 'Specify Settings' on the right. 

 Enter the script in the JavaScript Editor . . . 

Click OK and save and rename the new action. 

Add the files you want to process and then click start.   A new PDF will be generated for each source PDF that lists each of their SSNs.

/* Extract US Social Security Numbers From the Document */
// This script will scan all pages of the input document
// and extract :
// Social security numbers: 
// Output PDF document will be placed in the same folder
// as input. The name of the output document will be:
// Original filename + "_Extracted_SSNs"
// Visit www.evermap.com for more useful JavaScript samples.

var reMatch=/(?!000)([0-6]\d{2}|7([0-6]\d|7[012]))([ -])(?!00)\d\d\3(?!0000)\d{4}/g;

var strExt = "_Extracted_SSNs.pdf";
var strIntro = "Social Security Numbers extracted from document: ";
var strFinal = "Total number of SSNs extracted: " ;

ExtractFromDocument(reMatch,strExt,strIntro,strFinal);

function ExtractFromDocument(reMatch, strFileExt, strMessage1, strMessage2)
{
var chWord, numWords;

// construct filename for output document
var filename = this.path.replace(/\.pdf$/, strFileExt);

// create a report document
try {
    var ReportDoc = new Report();
    var Out = new Object(); // array where we will collect all our emails before outputing them
    
    ReportDoc.writeText(strMessage1 + this.path);
    ReportDoc.divide(1);      // draw a horizontal divider
    ReportDoc.writeText(" "); // write a blank line to output
    
    for (var i = 0; i < this.numPages; i++)
    {
        numWords = this.getPageNumWords(i);
        var PageText = "";
        for (var j = 0; j < numWords; j++) {
            var word = this.getPageNthWord(i,j,false);
            PageText += word;
            }
        var strMatches = PageText.match(reMatch);
        if (strMatches == null) continue;
        // now output matches into report document
        for (j = 0; j < strMatches.length; j++) {
            Out[strMatches[j]] = true; // store email as a property name
            }
    }
    
    var nTotal = 0;
    for (var prop in Out) 
    {
        ReportDoc.writeText(prop);
        nTotal++;
    }
    
    ReportDoc.writeText(" "); // output extra blank line
    ReportDoc.divide(1); // draw a horizontal divider
    ReportDoc.writeText(strMessage2 + nTotal);
    
    // save report to a document
    ReportDoc.save(
        {
        cDIPath: filename
        });

}
catch(e)
{
app.alert("Processing error: "+e)
}
    
} // end of the function
 

December 16, 2019

Evermap has posted a Javascript here (copied below) which you can use in Adobe Acrobat to extract email addresses used in multiple PDFs.

1. Add the script to a new Acrobat action.   In Adobe Acrobat XI go to Tools  . . . Action Wizard . . . Create New Action, then under the More Tools menu select 'Execute JavaScript'. 

2.   Enter the script in the editor that appears and save it as a new action, making sure to uncheck the 'Prompt User' box. 

3. When the action is run, first select the file or files you want to analyze.    Then click start.

4. When the files are processed, a new PDF file will be generated in the folder with the source files for each individual source file.   The report will list each email address that was located. 

// This script will scan all pages of the input document
// and extract valid email addresses into new PDF document
// Output PDF document will be placed in the same folder
// as input. The name of the output document will be:
// Original filename + "_Extracted_Emails"
// Visit www.evermap.com for more useful JavaScript samples.

var reEmail = /(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/g;

var strExt = "_Extracted_Emails.pdf";
var strIntro = "Email addresses extracted from document: ";
var strFinal = "Total number of email addresses extracted: " ;

ExtractFromDocument(reEmail,strExt,strIntro,strFinal);

function ExtractFromDocument(reMatch, strFileExt, strMessage1, strMessage2)
{
var chWord, numWords;

// construct filename for output document
var filename = this.path.replace(/\.pdf$/, strFileExt);

// create a report document
try {
    var ReportDoc = new Report();
    var Out = new Object(); // array where we will collect all our emails before outputing them
    
    ReportDoc.writeText(strMessage1 + this.path);
    ReportDoc.divide(1);      // draw a horizontal divider
    ReportDoc.writeText(" "); // write a blank line to output
    var nTotal = 0;
    var nCounter = 0;
    var nLinesPerPages = 60;

    for (var i = 0; i < this.numPages; i++)
    {
        numWords = this.getPageNumWords(i);
        var PageText = "";
        for (var j = 0; j < numWords; j++) {
            var word = this.getPageNthWord(i,j,false);
            PageText += word;
            }
    
        var strMatches = PageText.match(reMatch);
        if (strMatches == null) continue;
        // now output matches into report document
        for (j = 0; j < strMatches.length; j++) 
        {
            ReportDoc.writeText(strMatches[j]);
            nTotal++;
            nCounter++;
            if (nCounter > nLinesPerPages)
            {
                ReportDoc.breakPage();
                nCounter= 0;
            }
        }
    }
    
    ReportDoc.writeText(" "); // output extra blank line
    ReportDoc.divide(1); // draw a horizontal divider
    ReportDoc.writeText(strMessage2 + nTotal);
    
    // save report to a document
    ReportDoc.save(
        {
        cDIPath: filename
        });

}
catch(e)
{
app.alert("Processing error: "+e)
}
    
} // end of the function

December 3, 2019

You can use the Java script posted here by Chris West to easily convert multiple Excel spreadsheets in the xls format to comma separated .csv files.  Simply save the file named "Excel_-_XLS_To_CSV_Converter.js" to a folder containing the Excel files you need to convert. 

The java script will run and create a separate .csv file for each worksheet in the source spreadsheets. 

March 24, 2019

Don't miss how easy it can be to write and execute your own Java script in Adobe Acrobat.   If you'd like to extract specific page ranges from a PDF, you can use a script like this:

this.extractPages(21,30);

this.extractPages(51,60);

this.extractPages(101,110);

1. On the Tools panel, go to Action Wizard and select 'Create New Action . . . '

2. In the More Tools menu, click on 'Execute JavaScript'. 

3. Clicking on 'Specify Settings' will open the JavaScript Editor. 

4. Save and name the new action. 

5. You will then be able to execute the new action from the Action Wizard menu.   This script will quickly extract just the designated ranges. 

January 25, 2019

The Tip of the Night for May 1, 2015, discussed PDF Combine, a program that allows you to use to scripts to combine multiple sets of PDFs. 

The script below can be used to complete a common task:  adding slip sheets (reading, 'Exhibit 1'; 'Exhibit 2'; 'Exhibit 3', etc.) to the beginning of exhibits to be filed with a court.   Simply create 3 folders at the root of your C drive named, "Exhibit Set\Covers"; "Exhibit Set\Exhibits";  and "Exhibit Set\Final".  These will hold the slip sheets; documents marked as exhibits; and the merged PDFs the script will create. 

Copy the portion of the script for the number of exhibits you have marked, and put it in a text file saved with a '.bat' extension.  If you have PDF Combine installed once the file is double-clicked the PDFs will begin to generate.  Note the names of the PDFs for the slip sheets use two digits. 

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 01.pdf" "C:\Exhibit Set\Exhibits\Exhibit 1.pdf" "C:\Exhibit Set\Final\Exhibit 01_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 02.pdf" "C:\Exhibit Set\Exhibits\Exhibit 2.pdf" "C:\Exhibit Set\Final\Exhibit 02_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 03.pdf" "C:\Exhibit Set\Exhibits\Exhibit 3.pdf" "C:\Exhibit Set\Final\Exhibit 03_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 04.pdf" "C:\Exhibit Set\Exhibits\Exhibit 4.pdf" "C:\Exhibit Set\Final\Exhibit 04_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 05.pdf" "C:\Exhibit Set\Exhibits\Exhibit 5.pdf" "C:\Exhibit Set\Final\Exhibit 05_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 06.pdf" "C:\Exhibit Set\Exhibits\Exhibit 6.pdf" "C:\Exhibit Set\Final\Exhibit 06_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 07.pdf" "C:\Exhibit Set\Exhibits\Exhibit 7.pdf" "C:\Exhibit Set\Final\Exhibit 07_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 08.pdf" "C:\Exhibit Set\Exhibits\Exhibit 8.pdf" "C:\Exhibit Set\Final\Exhibit 08_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 09.pdf" "C:\Exhibit Set\Exhibits\Exhibit 9.pdf" "C:\Exhibit Set\Final\Exhibit 09_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 10.pdf" "C:\Exhibit Set\Exhibits\Exhibit 10.pdf" "C:\Exhibit Set\Final\Exhibit 10_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 11.pdf" "C:\Exhibit Set\Exhibits\Exhibit 11.pdf" "C:\Exhibit Set\Final\Exhibit 11_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 12.pdf" "C:\Exhibit Set\Exhibits\Exhibit 12.pdf" "C:\Exhibit Set\Final\Exhibit 12_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 13.pdf" "C:\Exhibit Set\Exhibits\Exhibit 13.pdf" "C:\Exhibit Set\Final\Exhibit 13_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 14.pdf" "C:\Exhibit Set\Exhibits\Exhibit 14.pdf" "C:\Exhibit Set\Final\Exhibit 14_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 15.pdf" "C:\Exhibit Set\Exhibits\Exhibit 15.pdf" "C:\Exhibit Set\Final\Exhibit 15_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 16.pdf" "C:\Exhibit Set\Exhibits\Exhibit 16.pdf" "C:\Exhibit Set\Final\Exhibit 16_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 17.pdf" "C:\Exhibit Set\Exhibits\Exhibit 17.pdf" "C:\Exhibit Set\Final\Exhibit 17_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 18.pdf" "C:\Exhibit Set\Exhibits\Exhibit 18.pdf" "C:\Exhibit Set\Final\Exhibit 18_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 19.pdf" "C:\Exhibit Set\Exhibits\Exhibit 19.pdf" "C:\Exhibit Set\Final\Exhibit 19_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 20.pdf" "C:\Exhibit Set\Exhibits\Exhibit 20.pdf" "C:\Exhibit Set\Final\Exhibit 20_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 21.pdf" "C:\Exhibit Set\Exhibits\Exhibit 21.pdf" "C:\Exhibit Set\Final\Exhibit 21_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 22.pdf" "C:\Exhibit Set\Exhibits\Exhibit 22.pdf" "C:\Exhibit Set\Final\Exhibit 22_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 23.pdf" "C:\Exhibit Set\Exhibits\Exhibit 23.pdf" "C:\Exhibit Set\Final\Exhibit 23_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 24.pdf" "C:\Exhibit Set\Exhibits\Exhibit 24.pdf" "C:\Exhibit Set\Final\Exhibit 24_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 25.pdf" "C:\Exhibit Set\Exhibits\Exhibit 25.pdf" "C:\Exhibit Set\Final\Exhibit 25_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 26.pdf" "C:\Exhibit Set\Exhibits\Exhibit 26.pdf" "C:\Exhibit Set\Final\Exhibit 26_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 27.pdf" "C:\Exhibit Set\Exhibits\Exhibit 27.pdf" "C:\Exhibit Set\Final\Exhibit 27_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 28.pdf" "C:\Exhibit Set\Exhibits\Exhibit 28.pdf" "C:\Exhibit Set\Final\Exhibit 28_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 29.pdf" "C:\Exhibit Set\Exhibits\Exhibit 29.pdf" "C:\Exhibit Set\Final\Exhibit 29_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 30.pdf" "C:\Exhibit Set\Exhibits\Exhibit 30.pdf" "C:\Exhibit Set\Final\Exhibit 30_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 31.pdf" "C:\Exhibit Set\Exhibits\Exhibit 31.pdf" "C:\Exhibit Set\Final\Exhibit 31_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 32.pdf" "C:\Exhibit Set\Exhibits\Exhibit 32.pdf" "C:\Exhibit Set\Final\Exhibit 32_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 33.pdf" "C:\Exhibit Set\Exhibits\Exhibit 33.pdf" "C:\Exhibit Set\Final\Exhibit 33_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 34.pdf" "C:\Exhibit Set\Exhibits\Exhibit 34.pdf" "C:\Exhibit Set\Final\Exhibit 34_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 35.pdf" "C:\Exhibit Set\Exhibits\Exhibit 35.pdf" "C:\Exhibit Set\Final\Exhibit 35_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 36.pdf" "C:\Exhibit Set\Exhibits\Exhibit 36.pdf" "C:\Exhibit Set\Final\Exhibit 36_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 37.pdf" "C:\Exhibit Set\Exhibits\Exhibit 37.pdf" "C:\Exhibit Set\Final\Exhibit 37_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 38.pdf" "C:\Exhibit Set\Exhibits\Exhibit 38.pdf" "C:\Exhibit Set\Final\Exhibit 38_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 39.pdf" "C:\Exhibit Set\Exhibits\Exhibit 39.pdf" "C:\Exhibit Set\Final\Exhibit 39_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 40.pdf" "C:\Exhibit Set\Exhibits\Exhibit 40.pdf" "C:\Exhibit Set\Final\Exhibit 40_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 41.pdf" "C:\Exhibit Set\Exhibits\Exhibit 41.pdf" "C:\Exhibit Set\Final\Exhibit 41_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 42.pdf" "C:\Exhibit Set\Exhibits\Exhibit 42.pdf" "C:\Exhibit Set\Final\Exhibit 42_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 43.pdf" "C:\Exhibit Set\Exhibits\Exhibit 43.pdf" "C:\Exhibit Set\Final\Exhibit 43_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 44.pdf" "C:\Exhibit Set\Exhibits\Exhibit 44.pdf" "C:\Exhibit Set\Final\Exhibit 44_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 45.pdf" "C:\Exhibit Set\Exhibits\Exhibit 45.pdf" "C:\Exhibit Set\Final\Exhibit 45_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 46.pdf" "C:\Exhibit Set\Exhibits\Exhibit 46.pdf" "C:\Exhibit Set\Final\Exhibit 46_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 47.pdf" "C:\Exhibit Set\Exhibits\Exhibit 47.pdf" "C:\Exhibit Set\Final\Exhibit 47_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 48.pdf" "C:\Exhibit Set\Exhibits\Exhibit 48.pdf" "C:\Exhibit Set\Final\Exhibit 48_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 49.pdf" "C:\Exhibit Set\Exhibits\Exhibit 49.pdf" "C:\Exhibit Set\Final\Exhibit 49_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 50.pdf" "C:\Exhibit Set\Exhibits\Exhibit 50.pdf" "C:\Exhibit Set\Final\Exhibit 50_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 51.pdf" "C:\Exhibit Set\Exhibits\Exhibit 51.pdf" "C:\Exhibit Set\Final\Exhibit 51_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 52.pdf" "C:\Exhibit Set\Exhibits\Exhibit 52.pdf" "C:\Exhibit Set\Final\Exhibit 52_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 53.pdf" "C:\Exhibit Set\Exhibits\Exhibit 53.pdf" "C:\Exhibit Set\Final\Exhibit 53_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 54.pdf" "C:\Exhibit Set\Exhibits\Exhibit 54.pdf" "C:\Exhibit Set\Final\Exhibit 54_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 55.pdf" "C:\Exhibit Set\Exhibits\Exhibit 55.pdf" "C:\Exhibit Set\Final\Exhibit 55_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 56.pdf" "C:\Exhibit Set\Exhibits\Exhibit 56.pdf" "C:\Exhibit Set\Final\Exhibit 56_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 57.pdf" "C:\Exhibit Set\Exhibits\Exhibit 57.pdf" "C:\Exhibit Set\Final\Exhibit 57_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 58.pdf" "C:\Exhibit Set\Exhibits\Exhibit 58.pdf" "C:\Exhibit Set\Final\Exhibit 58_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 59.pdf" "C:\Exhibit Set\Exhibits\Exhibit 59.pdf" "C:\Exhibit Set\Final\Exhibit 59_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 60.pdf" "C:\Exhibit Set\Exhibits\Exhibit 60.pdf" "C:\Exhibit Set\Final\Exhibit 60_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 61.pdf" "C:\Exhibit Set\Exhibits\Exhibit 61.pdf" "C:\Exhibit Set\Final\Exhibit 61_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 62.pdf" "C:\Exhibit Set\Exhibits\Exhibit 62.pdf" "C:\Exhibit Set\Final\Exhibit 62_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 63.pdf" "C:\Exhibit Set\Exhibits\Exhibit 63.pdf" "C:\Exhibit Set\Final\Exhibit 63_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 64.pdf" "C:\Exhibit Set\Exhibits\Exhibit 64.pdf" "C:\Exhibit Set\Final\Exhibit 64_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 65.pdf" "C:\Exhibit Set\Exhibits\Exhibit 65.pdf" "C:\Exhibit Set\Final\Exhibit 65_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 66.pdf" "C:\Exhibit Set\Exhibits\Exhibit 66.pdf" "C:\Exhibit Set\Final\Exhibit 66_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 67.pdf" "C:\Exhibit Set\Exhibits\Exhibit 67.pdf" "C:\Exhibit Set\Final\Exhibit 67_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 68.pdf" "C:\Exhibit Set\Exhibits\Exhibit 68.pdf" "C:\Exhibit Set\Final\Exhibit 68_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 69.pdf" "C:\Exhibit Set\Exhibits\Exhibit 69.pdf" "C:\Exhibit Set\Final\Exhibit 69_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 70.pdf" "C:\Exhibit Set\Exhibits\Exhibit 70.pdf" "C:\Exhibit Set\Final\Exhibit 70_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 71.pdf" "C:\Exhibit Set\Exhibits\Exhibit 71.pdf" "C:\Exhibit Set\Final\Exhibit 71_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 72.pdf" "C:\Exhibit Set\Exhibits\Exhibit 72.pdf" "C:\Exhibit Set\Final\Exhibit 72_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 73.pdf" "C:\Exhibit Set\Exhibits\Exhibit 73.pdf" "C:\Exhibit Set\Final\Exhibit 73_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 74.pdf" "C:\Exhibit Set\Exhibits\Exhibit 74.pdf" "C:\Exhibit Set\Final\Exhibit 74_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 75.pdf" "C:\Exhibit Set\Exhibits\Exhibit 75.pdf" "C:\Exhibit Set\Final\Exhibit 75_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 76.pdf" "C:\Exhibit Set\Exhibits\Exhibit 76.pdf" "C:\Exhibit Set\Final\Exhibit 76_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 77.pdf" "C:\Exhibit Set\Exhibits\Exhibit 77.pdf" "C:\Exhibit Set\Final\Exhibit 77_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 78.pdf" "C:\Exhibit Set\Exhibits\Exhibit 78.pdf" "C:\Exhibit Set\Final\Exhibit 78_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 79.pdf" "C:\Exhibit Set\Exhibits\Exhibit 79.pdf" "C:\Exhibit Set\Final\Exhibit 79_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 80.pdf" "C:\Exhibit Set\Exhibits\Exhibit 80.pdf" "C:\Exhibit Set\Final\Exhibit 80_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 81.pdf" "C:\Exhibit Set\Exhibits\Exhibit 81.pdf" "C:\Exhibit Set\Final\Exhibit 81_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 82.pdf" "C:\Exhibit Set\Exhibits\Exhibit 82.pdf" "C:\Exhibit Set\Final\Exhibit 82_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 83.pdf" "C:\Exhibit Set\Exhibits\Exhibit 83.pdf" "C:\Exhibit Set\Final\Exhibit 83_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 84.pdf" "C:\Exhibit Set\Exhibits\Exhibit 84.pdf" "C:\Exhibit Set\Final\Exhibit 84_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 85.pdf" "C:\Exhibit Set\Exhibits\Exhibit 85.pdf" "C:\Exhibit Set\Final\Exhibit 85_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 86.pdf" "C:\Exhibit Set\Exhibits\Exhibit 86.pdf" "C:\Exhibit Set\Final\Exhibit 86_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 87.pdf" "C:\Exhibit Set\Exhibits\Exhibit 87.pdf" "C:\Exhibit Set\Final\Exhibit 87_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 88.pdf" "C:\Exhibit Set\Exhibits\Exhibit 88.pdf" "C:\Exhibit Set\Final\Exhibit 88_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 89.pdf" "C:\Exhibit Set\Exhibits\Exhibit 89.pdf" "C:\Exhibit Set\Final\Exhibit 89_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 90.pdf" "C:\Exhibit Set\Exhibits\Exhibit 90.pdf" "C:\Exhibit Set\Final\Exhibit 90_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 91.pdf" "C:\Exhibit Set\Exhibits\Exhibit 91.pdf" "C:\Exhibit Set\Final\Exhibit 91_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 92.pdf" "C:\Exhibit Set\Exhibits\Exhibit 92.pdf" "C:\Exhibit Set\Final\Exhibit 92_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 93.pdf" "C:\Exhibit Set\Exhibits\Exhibit 93.pdf" "C:\Exhibit Set\Final\Exhibit 93_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 94.pdf" "C:\Exhibit Set\Exhibits\Exhibit 94.pdf" "C:\Exhibit Set\Final\Exhibit 94_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 95.pdf" "C:\Exhibit Set\Exhibits\Exhibit 95.pdf" "C:\Exhibit Set\Final\Exhibit 95_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 96.pdf" "C:\Exhibit Set\Exhibits\Exhibit 96.pdf" "C:\Exhibit Set\Final\Exhibit 96_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 97.pdf" "C:\Exhibit Set\Exhibits\Exhibit 97.pdf" "C:\Exhibit Set\Final\Exhibit 97_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 98.pdf" "C:\Exhibit Set\Exhibits\Exhibit 98.pdf" "C:\Exhibit Set\Final\Exhibit 98_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 99.pdf" "C:\Exhibit Set\Exhibits\Exhibit 99.pdf" "C:\Exhibit Set\Final\Exhibit 99_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

"C:\PDF Combine\PDFCombine.exe" "C:\Exhibit Set\Covers\Exhibit 100.pdf" "C:\Exhibit Set\Exhibits\Exhibit 100.pdf" "C:\Exhibit Set\Final\Exhibit 100_Combine.pdf" -kfs -c "Combine to PDF" -bookmark -npr 0,0 -bpdf

January 19, 2019

You can use the split function in Python to easily create a comma delimited set.    If you have a divider to split upon, a script can substitute that divider with quotation marks and commas. 

Follow these steps:

1. Name the set with the text you need to divide up. 

>>> set1 = 'manchester england bristol england london england'

2. Use the split function with the divider designated in parentheses:
>>> set1.split("england")

3. It will generate a nice comma delimited set. 
['manchester ', ' bristol ', ' london ', '']
>>> 

January 18, 2019

Python scripts can be used to add returns between multiple strings that are separated with unequal blank spaces.   The resulting list will have the extra spaces excised.   This task is accomplished with the split function.

Working in Python 2.7, follow these steps. 

1.  Assign a name to the text to be parsed.  In this example, we call the text 'set1'

>>> set1 = "Lopez        Lee             Smith"

2.  Create a second set (here it's called 'names'), and then use the split function with no setting between the parentheses that follow the function name.  The name of what we're parsing precedes the split function.
>>> names = set1.split()

3. Python will understand a reference to a single member of a set with a plural name.   Use this command:
>>> for name in names:

. . . and then press return and print the reference to the set with the singular name. 
    print name

Press return twice to get the results:

    
Lopez
Lee
Smith
>>> 

January 16, 2019

Here's a simple guide to accessing Excel files with Python.  I'm working with Python 2.7 here. 

First in Windows command prompt, in the directory containing your Python scripts (see for example, C:\Python27\Scripts), run two modules:

pip install xlrd

pip install xlwt

Then in the IDLE (Python GUI) program enter the below script. 

1.  Import the xlrd module

>>> import xlrd

2. open the workbook

>>> book = xlrd.open_workbook("C:\FooFolder\python\BattingPost.xls")

3. designate the worksheet you want to work with

>>> sheet = book.sheet_by_name("BattingPost")

4. to pull data from a particular cell, assign a name to the cell.

>>> playerid = sheet.cell_value(2,2)

5. the value of the assigned name can be displayed by using the print command. 

>>> print playerid

>>> import xlrd
>>> book = xlrd.open_workbook("C:\FooFolder\python\BattingPost.xls")
>>> sheet = book.sheet_by_name("BattingPost")
>>> playerid = sheet.cell_value(2,2)
>>> print playerid
bradyst01
 

This is a view of the spreadsheet I pulled data from.