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

HP never again

Aside

I’ve never been a huge fan of HP (except for their workgroup class laser printers), but after my experience trying to submit a warrenty claim today (still haven’t found where to call or submit online), I am done with the company (it’s a shame too, as it was a decent desktop tabloid size printer). Thus far i have found centers for every country aside from the USA, options for products out of warranty, and registered the product, so it keeps letting my check my warranty information. Any help would make me happy.

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).

Why TIFF

Aside

A lot of my scripts focus on converting PDF to TIFF. The reason for this is that even though presentation software now pretty much universally supports the PDF format, it has some issues. Most software actually rasterizes the PDF, sometimes this happens in real time on fist viewing. Depending on the computer and PDF the real time conversion can dramatically degrade the display performance (increasing the time until the page the displayed). Additionally the Raster is often at a lower resolution than is actually useful (especially for monochrome images where lack of grays can really damage detail). I therefore ALWAY convert my documents to TIFF except for in the extreme case where I have less than a minute from receipt to display. Additionally, I use single page TIFFs, as first page display can be very slow on large multi-page TIFFs (this is done at the expense of network transfer time). I still use a PDF workflow until this final stage though, as it is far better until the loading into the display software.

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).