steelThread/mimeograph — pull request #37 by carlost (2012-05-21 19:45:05+00:00)
Title: Merge hocr into original pdf

It generates searchable PDFs that are visually indistinguishable from the original source pdf. This works reliably across a large sample of production PDFs from a live system at the usitc (usitc.gov). It works across a variety of PDF sizes.

* this system relies on pdftk for splitting and merging PDFs. pdftk is a pretty old library but appears to be the best available option.
* i changed the coffeescript dependency to a specific version. this was to ensure that every environment was using the same cs compiler & libs. i suggest that we do this for all of the dependencies.
* i dropped the use of GS in favor or pdftk (splitting a PDF into multiple PDF pages) & ImageMagick (turn a PDF page into an image)
* the Converter and PageGenerator classes are pretty large. However, the async library makes it easy to separate the various steps in both classes into little methods.
* the new mimeo takes substantively longer to process a PDF than the previous version because there is no much more activity going on.
* There are a number of TODOs added by this pull request. Once it is approved I am going to add issues for each one and remove them from the codebase.
* I did NOT attempt to break the mimeograph.coffee file up into separate files (e.g. job class, mimeograph etc) because that would make the diff almost impossible to follow. Once this is accepted we should break the files up.