All posts by Keith Garner

Concatenate PDFs

I often like to print out many web pages to read on the train.  To not waste paper I like to print them 2 up and double sided.  If the printer supports it, I also like to staple the pages.  On Linux, I use Firefox to print to postscript, then used a2ps to have the PS files combined, 2-uped, and short-side duplexed.  I’d then manually staple it, as there was no good way to tell the print center at work to staple it.  I’d use a command line similar to this:

a2ps -Eps -Afill -stumble 1.ps 2.ps 3.ps 4.ps

I tried this approach under OS X, but the problem is that the postscript that is generated on OS X is so detailed that it takes forever to process to print out, on the order of 2 minutes of processing per article.  Since PDF is the spooling format for printing in OS X (coming soon to linux) I thought I’d look to see if there was an easy way to concatinate PDF files so I could then have the regular printing interface (via Preview) handle the 2-up, double-sided, stapling goodness.

After much searching around I found this article and later this web page.  Combining a bit from both, I came up with following that works really well in my few days of testing.

texexec --pdf --paper=letter --pdfarrange --result all.pdf 1.pdf 2.pdf 3.pdf 4.pdf

It runs really quickly (especially in comparison to the a2ps method) and then I just open all.pdf and print from there.  It requires that you have teTeX installed.  On both Linux and OS X I had this installed as part of the prerequesets for docbook and doxygen.

Put OS X dock into the corner

Dock pinned in corner.I recently got a MacBook Pro at work.  I’ve been slowly adjusting to OS X.  I’ll post more on the adjustments I knew I’d have to make and the ones that suprised me later.  However, I found a nick trick that took longer to find than I thought it would, so I’d blog it.

The OS X dock has its good and bad points, but its important due to that’s where minimized apps go and where running apps keep there icons.  However, by default, it is centered and that doesn’t jive with how I like to place windows.  Especially when coding.  Based on the information given here at applepedia and the definition at this O’Reilly article I was able to figure out how to put it into the lower left or lower right corner.  Click on the image here to see a screenshot of the dock put in its place.

The feature is called pinning.  Just do the following from the command line:

# defaults write com.apple.dock pinning -string start

After you restart the doc (by either logging back in or a nice "killall Dock.app" that will pin the dock to the left.  If you want to lock it to the right, switch the start to end.

Tampering with evidence?

Hypothetical situation:

The company you work for was issued a court order demanding you turn over all the presentations that the company’s employees have given.  Further, let’s say you have always done your presentations in OpenOffice.org Impress.  You burn a CD-R of your 100s of presentations and include a README.txt (launched by an AUTORUN.INF) that says "Anything not opened by PowerPoint can be opened by the freely available OpenOffice.org at http://www.openoffice.org/"

Later, your in-house legal council coimes to you and says "Lawyers don’t have OpenOffice, we need to make this more user-friendly to lawyers, can you convert them to PowerPoint?"  After arguing over free and easiness to obtain of OpenOffice, you give in and convert them all to PowerPoint.

Let’s take it as a given that no file format conversation is 100% accurate.  Let’s also assume that the spirit of the court order is for the presentations you actually gave.

Did you tamper with evidence?  The PowerPoint version is technically NOT the version you actually gave.  Or is it good enough? 

Which science fiction crew could I hang with?


Nebuchadnezzar (The Matrix)

88%

Moya (Farscape)

88%

Babylon 5 (Babylon 5)

81%

Serenity (Firefly)

75%

SG-1 (Stargate)

75%

Galactica (Battlestar: Galactica)

69%

Millennium Falcon (Star Wars)

69%

FBI's X-Files Division (The X-Files)

56%

Deep Space Nine (Star Trek)

56%

Enterprise D (Star Trek)

50%

Andromeda Ascendant (Andromeda)

38%

Bebop (Cowboy Bebop)

31%

Your Ultimate Sci-Fi Profile II: which sci-fi crew would you best fit in? (pics)
created with QuizFarm.com