Batch File to Convert Multiple PDFs to TIFF on Windows

Unlike my previous batch files, this one does not require Cygwin or Bash, this makes it more accessible, but slightly less powerful.

This post contains a Windows .bat file that allows a selection of PDFs to be drug onto it. The batch script will convert the PDFs to .tif files. The script below converts the PDFs to 300 DPI multi-page group4 TIFFs. With information from previously posted scripts, it can be easily modified for other output. To run this script it is required to install Ghostscript for windows, and to adjust the command to the correct version (this script used Ghostscript v9.05 on 32-bit Windows. Continue reading

My Favorite Regular Expression Quick Reference

I find This site incredibly useful when working on complex regular expressions (or simple ones doing something I’m not familiar with).

In connection with Notepad++, I frequently use simple regular expressions for converting between Sanction and Trial Director file formats, and for creating clip import-files quickly/converting files provided by other people to be in the format ppp:ll-ppp:ll. Going from a format suck as that, to a fully formatted clip list in Sanction takes a matter of seconds, and getting there from an arbitrarily formatted list is fairly quick too.

Additionally, regular expressions are useful for editing out parts of ASCII depositions (such as time-of-day stamps, or duration lengths from exported designations).

Cygwin Saves the Day (again)

A frequent problem I’ve been running into is that LiveNote offers a convenient way to export multiple transcripts, but not in a format that Sanction understand (.pfc). Fortunately this format is simple a bunch of .ptf files connected together (with some redundant header information not duplicated, which can cause a mild annoyance with TrialDirector, but Sanction tolerates it). The solution I’ve found was to run the following command:

csplit ExportedBatch.pcf '/begin=Transcript[^I]/' '{*}';

This will kick out a bunch of files, each being a functional .ptf (except for the first, which is superfluousness header info). To find a specific transcript, open all files in Notepad++ and search all open files for the name or date. Sanction does a pretty good job of reading the meta-data included, so they all can be drug in at once (this saved me from hand exporting hundreds of individual transcripts once).

A script to name files by Bates number

This script was made because I often would receive PDFs named by their Bates range, or even just the first Bates number of the file, with gaps in numbers between the files. In these cases I wanted to be able to bring the files up in Sanction or Trial Director by typing the bates number, I did NOT want to rename each page document by document.
Continue reading

A script for monochrome tiffs

This script is pretty much the same as the previous script, but converts everything to monochrome (with the exception of the first page).

It’s a little less cleanly written, and ends up converting the first page twice (it does the whole document in monochrome, then deletes and replaces the first page in color to keep an exhibit label in color), so for many small documents it can be fairly inneficient, though the efficiency of the ghostscript engine, and the ability to run more than one instance at a time more than makes up for it if just a few documents are long.
Continue reading

A basic (very) PDF to Tiff script I’ve developed

Why?

  • Creates a directory structure for ideal adding to Sanction/Trial Director.
  • Files converted to single page tiffs for fastest loading (especially of large documents)
  • This version maintains color (LZW compressed Tiff output), to keep up with modern discovery.
  • Designed to address weaknesses in other solutions (not litigation focused, too slow, single threaded)

Run this script by executing in a directory of PDFs, runs in Cygwin, using ghostscript to convert (a cygwin install of bash, and ghostscript should be the minimum required to run).

Developed because AdultPDF converter did not name files as I desired, could only run a single instance (this script can be run in multiple shells to take advantage of multiple CPUs). It is considerably faster than other solutions to this problem.

Continue reading