Showing posts with label PDF. Show all posts
Showing posts with label PDF. Show all posts

2012-10-18

How to add watermarks to your PDF files

You probably have seen documents with background watermarks stating something like:

Draft
Proof
Final
Urgent
Priority
Do Not Copy
Copy
For Your Eyes Only
Review Copy
Confidential
Top Secret
Duplicate
... you get the idea :)

There are free tools that can do it for you. I recommend PDFill Tools or Pdftk (command-line alternative).

2012-06-28

Saving Visio diagram as PDF

File-> Save As -> Change File Type to PDF (the actual description in Visio 2010 is "Save As Type...").

To get the size down to what you want, assuming you are using Visio 2010 - go to the Design ribbon at the top, and change "Size" to "Fit to Drawing"

Credits: DavidChenware @ superuser.com

2011-09-13

More PDF Hacking

I've been using the pdftk tool to make command-line changes to PDF files since December 2010.

Here are a few more useful examples:

:: Add a stamp image to an existing PDF file
pdftk MyDoc.pdf stamp Stamp.pdf MyStampedDoc.pdf

:: Extract pages from a PDF file
pdftk MyDoc.pdf cat 1-2 output Pages1and2ofMyDoc.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

Feel free to share more useful commands in the comments section!

2010-12-16

PDF Hacking

Adobe Reader X is the latest and very improved version of Acrobat's PDF Reader. The most significant changes for me were in the browser integration with Firefox. It is so much better now. The user interface is also leaner.

For me, the PDF Reading choice is settled, but for small PDF adjustments, like joining files or rotating pages, Adobe Acrobat is an expensive option.

If you are comfortable with the command prompt, there is a free and powerful option: PDF Toolkit. It is based on the iText library explained in the Manning book iText in Action.

To install pdftk, go to the web page and download the package for your operating system. For Windows, download the zip file and unzip it to C:\Program Files\pdftk.

Next, go to Start Menu, right-click on Computer, select Properties, and choose "Advanced system settings" from the left sidebar. Next press "Environment variables" button.
Create an environment variable called PDFTK_HOME and set it to pdftk folder path.
Next, add %PDFTK_HOME%\bin to the PATH variable. You can now open new command prompts and type the following command to read the help: pdftk -h

Here are a few useful examples (there are more described in the help output):

:: To concatenate xpto.pdf and xpty.pdf and output result to xpt.pdf
C:\Users\Me> pdftk xpto.pdf xpty.pdf cat output xpt.pdf

:: To rotate xpt.pdf from page 1 to end 90 degrees counter-clockwise and output to xpt-rotated.pdf
C:\Users\Me> pdftk xpt.pdf cat 1-endL output xpt-rotated.pdf

The page rotation setting can cause pdftk to rotate pages and documents. Each option sets the page rotation as follows (in degrees):
N: 0, E: 90, S: 180, W: 270, L: -90, R: +90, D: +180.
L, R, and D make relative adjustments to a page’s rotation.