Spread pages book layout in PDF documents

This week I composed a document with flyleaf and subsequent two-paged layout like in these two examples with Adobe Indesign and Microsoft Word:

But when exporting/printing to a PDF file the PDF document in Acrobat Reader shows only a single page at a time. One may manually select the view option with two-paged layout and flyleaf but I wanted the document to be always shown that way! After Googling I found a solution using Adobe Acrobat Pro where it is possible to set this option and save the changes directly to the PDF file. Unfortunately Acrobat Pro isn’t cheap and I don’t own a copy so I looked for an alternative.

Finally I found BeCyPDFMetaEdit by Benjamin Bentmann which is a small freeware Windows utility for changing the XMP meta data of a PDF document file. The viewer preference actually is just a XMP setting. The program can remove any application or pdf printer metadata as well (like “Created with …foo program” or “Printed using PDF…bar”). The result after opening the PDF document in Adobe Acrobat Reader then looks like (before vs. after):

Ta-da, A book!

Advertisement

Find all files containing a string but NOT containing another

Find all files containing a string but NOT containing another.

Believe it or not, this was quite a challenge. I tried to use precedent and subsequente regular expressions in UltraEdit for this but UltraEdit’s regex is quite dumb. So I came up with good-old shell:

find . -name "*html" | xargs grep -l 'StringA' | xargs grep -L 'StringB'

Beginning from the current directory (“find .”) this finds all html files containing the string ‘StringA’ in the first grep statement but NOT the ones containing the string ‘StringB’ in the second grep statement. If any nerd could tell me how to do this more easily, this would bring light in my day-to-day life. 🙂 Actually this shell piping is pretty fast. I ran this over hundreds of html files in half of a second. Using PERL you’d need 30 lines and half an hour, I think.

To do this in Windows, you’ll need gfind, xargs and GNU grep (see UnxUtils website)

Startup

Omg, I’m blogging! Well, first maybe some stuff I’ve been doing at present. This will mainly be GPU rendering and Direct3D/OpenGL topics. There’re many interesting blogs caring about such issues:

BrainDump by flo
Flo is lead dev at RadonLabs in Berlin (Nebula2+3 engines, Drakensang game for example)
http://flohofwoe.blogspot.com/

Diary of a Graphics Programmer
http://diaryofagraphicsprogrammer.blogspot.com
Blog of Wolgang Engel (ShaderX books, Rockstar games dev)

http://realtimecollisiondetection.net
Christer Ericson’s blog (Sony dev)

http://drkappa.blogspot.com
Dr. Kappa’s Korner.  Graphics blog.

http://www.realtimerendering.com/blog
Real-Time Rendering blog, by sackboy from LittleBIGPlanet project, There’s also a book with that name ^^

http://levelofdetail.wordpress.com
LOD stuff, but also posts about shadows, Radiosity, etc.