Category: PDF
-
How-to: Use Preview to put signatures on PDF’s, Pages Documents, and Mail messages – 9to5Mac
I discovered that lovely feature right now myself – and then I looked for a nice description – you may like it yourself.
-
error when viewing PDFs in emacs resp. after deleting associated buffers
the annoying, recurring error message:
Error running timer `doc-view-display’: (error “Selecting deleted buffer”)
what to do:
M-x cancel-timer
Cancel timers of function: doc-view-displayUpdate 2019-11-05 (GNU Emacs 26.3 on Mojave):
M-x cancel-function-timers
Cancel timers of function: doc-view-display -
book: PDF Explained
- http://shop.oreilly.com/product/0636920021483.do
- https://library.oreilly.com/book/0636920021483/pdf-explained/toc

An introduction to the PDF file format, threaded through with practical examples – deconstructing, creating and processing PDF files. After exploring how PDF is produced, and how it can be edited with tools from text editors to Ghostscript to PDFTK, readers will learn to deal with problems with PDF files and common error messages.
-
how to print a PDF document together with its filename in its upper left corner?
This is only a very special case of “how to add text given on the command line to a PDF file?“
If I don’t find a nice and read utility to do this,
- I will create an image file from the PDF file,
- I will create another image file from that text string (ImageMagick, GraphicsMagic?!?),
- and I will finally overlay them (ImageMagick, GraphicsMagic?!?).
PDF Hacks‘ Hack# 90 describes how to “Superimpose PDF Pages“; there is also a one-liner with pdftk for that:$ pdftk mydoc.pdf output mydoc.marked.pdf background watermark.pdfI need to print like 200 rather similar (1-page) files, which look rather, rather similar, and I don’t want to guess the filename from the contents of the page, so I prefer to print the filename on the same page as the actual contents.Update 2011-07-04:
I am using text2pdf (a rather, rather simple tool) for this task (regard this as one logical line):$ echo “text to be printed into the upper left corner” | /usr/local/text2pdf/text2pdf -A4 -s10 -v12 | pdftk original_file output file_with_sth_in_its_upper_left_corner background –
-
pdftk – The PDF Toolkit
- http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
- https://www.pdflabs.com/docs/pdftk-man-page/
- http://oreilly.com/catalog/9780596006556/ – “PDF Hacks” (the book’s author is pdflab’s director and founder)
Superimpose Pages with pdftk
pdftk packs iText’s power into a standalone program. Apply a single PDF page to the background of an entire document like so:
pdftk mydoc.pdf output mydoc.marked.pdf background watermark.pdf
pdftk will use the first page of watermark.pdf, if it has more than one page. You can combine this background option with additional input operations (such as assembling PDFs [Hack#51]) and other output options (such as encryption [Hack #52]).
-
xpdf: Error (…): Missing ‘endstream’
There are a few PDF documents around here, that I can read with Acrobat Reader w/o problems, but xpdf and its companions moan. I guess, that’s because they got modified and a little destroyed using Acrobat X Pro.
I used pdftk to get rid of that problem: first output/uncompress, than output/compress again:
$ pdftk x.pdf output
x.uncompressed.pdf uncompress
$ pdftk x.uncompressed.pdf output
x.recompressed.pdf compress -
how to burst a PDF document into single pages (etc.)
This command line shows, how to get the output files named your way:
$ pdftk … burst output ‘page.%02d.pdf’
Split Select Pages from Multiple PDFs into a New Document:
$ pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf
Select a single page (#130) into a new document:$ pdftk A=one.pdf cat A130 output one.p130.pdfExtract pages 10 through 11 to y.pdf :$ pdftk x.pdf cat 10-11 output y.pdfPlease find more information (like examples, man page, …) on pdftk through the link above!
-
form fields in PDF – how to retrieve their details?
This command line shows you a few details:
$ pdftk … dump_data_fields
Not enough details for me.
What about CAM::PDF?
It comes with a couple of nice sample utilities (the bin/ subdirectory), one of them is called listpdffields.pl . It also does not show me enough details, but I think I will enhance that one.Update / 2010-12-11:
Yes, CAM::PDF works very well for me. I wrote another article on that. -
ruby and PDF
the speaker: Lukas Rieder
working for “paper c”some approaches
writing PDF
… act as flying saucer …UNIX tools
xpdf :
$ pdftotext -layout -enc UTF-8 …pdftk
$ pdftk compressed.pdf uncompress output uncompressed.pdfimagemagick
$ convert … # e.g. towards JPEGthe speaker wrapped some unix tools and called that “PdfUtils”, and released it as GEM.