Rambles around computer science

Diverting trains of thought, wasting precious time

Fri, 02 Apr 2010

Where the time goes

At 2pm today I finished making some comments on a print-out on a draft undergraduate dissertation of one of my students. He's out of town at the moment, so I scanned in my scribblings and prepared to send them. I'd printed the 68-page draft 2-up to save paper. We have a nifty scanner that can sheet-feed, so scanning 34 pages was very quick and easy, except for one problem: for some reason the pages came out in reverse. I later discover that the reason the pages came out reversed is that although I placed the pages face-down in the feeder, as the markings on the feeder suggested I should, the software has a very helpful option called “scan facing forward“ (or somesuch) which reverses this logic. More annoyingly, this is turned on by default! Unfortunately the scanner software has no facility to re-order pages (except during scanning). No problem, I thought -- I'll go back to my desk and re-order them in my familiar Unix tools, rather than spending more time down at the scanner.

It should be simple: split the PDF into pages using gs -sDEVICE=pdfwrite -sOutputFile=page%d, reorder the pages using ls | tac, and pdfjoin. Problem one: I couldn't seem to get page%d working with Ghostscript's pdfwrite driver, so had to use psrgb and then convert the Postscript output to PDF using ps2pdf. This should work, surely? No. Problem two: neither ps2pdf nor Ghostscript understands page orientation properly, so what I get is a portrait-orientation window onto my landscape-oriented pages, with the right-hand side cut off. This web page reveals that it's a limitation of both Ghostscript and its pdfwrite driver. This bug report shows that the problem has been around for years and hasn't gone away. None of the suggested Ghostscript incantations on this web page has any effect for me, but I waste an hour trying them and various other combinations of options.

It's now 4.22pm, and I've just tried using Adobe Acrobat to perform the same feat. It has exactly the same problem! As my time gets more contended, it gets more and more annoying to spend it fighting crappy software. I could probably optimise this by developing the judgement not to pursue the “should work” way, and instead cut straight to the “ugly, but definitely works” way. I'm about to go down and re-scan the document.

[/meta] permanent link


Powered by blosxom

validate this page