Merge pdfbox, print margins, copies and bug fixes back into master.

#7 #8 #12 #9