O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  


 
Buy the book!
PDF Hacks
By Sid Steward
August 2004
More Info

How do these hacks stand up? Comment on a hack from the book by choosing the associated "Discuss" link below. You can also view the code from any of the hacks by clicking on the "Listing" or "Code" links. A number of hacks have been selected to be featured online in their entirety; you may view those hacks by clicking on the hack titles that are linked.

You can also download all the scripts and other files for this book here.

Jump to: Consuming PDF  | Managing a Collection  | Authoring and Self-Publishing: Hacking Outside the PDF  | Creating PDF and Other Editions  | Manipulating PDF Files  | Dynamic PDF  | Scripting and Programming Acrobat

Consuming PDF

HACK
#1

Read PDFs with the Adobe Reader
Use Adobe's Acrobat Reader, renamed Adobe Reader in its latest release, to read PDF files on the Web and elsewhere
[Discuss (0) | Link to this hack]

HACK
#2

Read PDFs with Mac OS X's Preview
If you have a Macintosh running OS X, the operating system includes a Preview application that enables you to look at PDFs without downloading Acrobat Reader
[Discuss (0) | Link to this hack]

HACK
#3

Read PDFs with Ghostscript's GSview
The Ghostscript toolkit for working with PostScript and PDF supports a number of simple viewers, including GSview
[Discuss (0) | Link to this hack]

HACK
#4

Speed Up Acrobat Startup
Move the plug-ins you don't need out of your way
[Discuss (0) | Link to this hack]

HACK
#5

Manage Acrobat Plug-Ins with Profiles on Windows
If you use Acrobat for several purposes, create several profiles
[Discuss (0) | Link to this hack]

HACK
#6

Open PDF Files Your Way on Windows
Multipurpose PDF defies the double-click, so make a right-click compromise. Impose your will on Internet Explorer or Mozilla with a registry hack
[Discuss (0) | Link to this hack]

HACK
#7

Copy Data from PDF Pages
Extract data from PDF files and use it in your own documents or spreadsheets
[Discuss (0) | Link to this hack]

HACK
#8

Convert PDF Documents to Word
Automatically scrape clipboard data into a new Word document
[Discuss (0) | Link to this hack]

HACK
#9

Browse One PDF in Multiple Windows
Tear off pages and leave them on your desktop for reference as you continue reading
The Code
[Discuss (0) | Link to this hack]

HACK
#10

Pace Your Reading or Present a Slideshow in Acrobat or Reader
You can make Acrobat or Reader advance a document at a preset interval, making it easy to maintain a given reading pace or to present slides
[Discuss (0) | Link to this hack]

HACK
#11

Pace Your Reading or Present a Slideshow in Mac OS X Preview
Turn your Mac into a big, beautiful e-book reader, thanks to the wonders of Preview
[Discuss (0) | Link to this hack]

HACK
#12

Unpack PDF Attachments (Even Without Acrobat)
Save attachments to your disk, where you can use them
[Discuss (0) | Link to this hack]

HACK
#13

Jump to the Next or Previous Heading
Use PDF bookmark information to stride from section to section in Acrobat on Windows
[Discuss (0) | Link to this hack]

HACK
#14

Navigate and Manipulate PDF Using Page Thumbnails
Acrobat's thumbnail view pane has some useful, unexpected features for reorganizing or jumping through your documents
[Discuss (0) | Link to this hack]

Managing a Collection

HACK
#15

Bookmark PDF Pages in Reader
Create and maintain a list of PDF pages for rapid access

[Discuss (1) | Link to this hack]

HACK
#16

Create Windows Shortcuts to Online PDF Pages with Acrobat
Quickly return to the particular page of an online PDF, and manage these shortcuts with your other Favorites
[Discuss (0) | Link to this hack]

HACK
#17

Create Windows Shortcuts to Local PDF Pages
Pinpoint and organize the essential data in your local PDF collection
[Discuss (0) | Link to this hack]

HACK
#18

Turn PDF Bookmarks into Windows Shortcuts
Turn your PDF inside out
[Discuss (1) | Link to this hack]

HACK
#19

Generate Document Keywords
Complement your search strategy with document keywords
[Discuss (0) | Link to this hack]

HACK
#20

Index and Search Local PDF Collections on Windows
Teach Windows XP or 2000 how to search the full text of your PDF along with your other documents. Or, use Adobe Reader to search PDF only
[Discuss (0) | Link to this hack]

HACK
#21

Spinning Document Portals
Help readers navigate your PDF documents with an HTML front-end. Let them search your PDF's full text, and then link search hits directly to PDF pages
[Discuss (0) | Link to this hack]

HACK
#22

Spinning Collection Portals
Convert directories full of secretive PDFs into inviting HTML portals, automatically
[Discuss (0) | Link to this hack]

HACK
#23

Identify Related PDFs
Analyze word frequency to find relationships between PDFs
[Discuss (0) | Link to this hack]

Authoring and Self-Publishing: Hacking Outside the PDF

HACK
#24

Keep Your Source Smart
Cherish and maintain your source document; dumb PDF is no substitute
[Discuss (0) | Link to this hack]

HACK
#25

Convey Your Document's Value with Good Design
Ensure that your document looks good and reads well
[Discuss (0) | Link to this hack]

HACK
#26

Create Charts and Graphs from Raw Data
Put a friendly face on your data before turning it into PDF
[Discuss (0) | Link to this hack]

HACK
#27

Become a Publisher
Purchase your book's ISBN and become a publisher
[Discuss (0) | Link to this hack]

HACK
#28

Print at Home, at the Office, or at Kinko's
Copy shops pick up where your laser printer leaves off
[Discuss (0) | Link to this hack]

HACK
#29

Publish POD and E-books
Partner with Lightning Source and plug your book into the system
[Discuss (0) | Link to this hack]

HACK
#30

Sell Through Amazon
Partner with Amazon and let them handle the transaction
[Discuss (0) | Link to this hack]

HACK
#31

Sell Your Book, Sell Yourself
What are you selling? Who's going to buy it?
[Discuss (0) | Link to this hack]

Creating PDF and Other Editions

HACK
#32

Create Interactive PDF with Your Word Processor
Interactive PDFs take advantage of the information in word processing documents to create navigation features such as bookmarks and hyperlinks
[Discuss (1) | Link to this hack]

HACK
#33

Create a Printable, On-Screen Edition from Word
Change a few page settings to yield two-column, screen-oriented pages
[Discuss (0) | Link to this hack]

HACK
#34

Multipurpose PDF
Give readers many editions in one package without tagging your PDF
[Discuss (0) | Link to this hack]

HACK
#35

Create an HTML Edition from Your Word Processor
Offer readers both PDF and HTML editions of your work and they will love you
[Discuss (0) | Link to this hack]

HACK
#36

Create a Handheld Edition from Your HTML
Deliver your content to mobile professionals and gadget geeks without PDF's overhead
[Discuss (0) | Link to this hack]

HACK
#37

Convert Documents from Tools You Don't Own to PDF
Even if you don't have the document's authoring tool, you can often convert it to a PDF file
[Discuss (0) | Link to this hack]

HACK
#38

Acrobat Distiller and Its Profiles
Select the best Distiller profile for your purpose
[Discuss (0) | Link to this hack]

HACK
#39

Print to PDF with Ghostscript and RedMon on Windows
Enjoy a convenient path to PDF, free of charge
[Discuss (0) | Link to this hack]

HACK
#40

Save As PDF with Mac OS X
Create PDFs quickly and easily from any Macintosh OS X program
[Discuss (0) | Link to this hack]

HACK
#41

Maximize PDF Portability
PDF version differences can affect you and your readers
[Discuss (0) | Link to this hack]

HACK
#42

Configure Distiller and Ghostscript for Your Purpose
Unlock the secret powers of Distiller and Ghostscript
[Discuss (0) | Link to this hack]

HACK
#43

Embed and Subset Fonts to Your Advantage
Sometimes it makes sense to embed fonts, while other times it just costs you space
[Discuss (0) | Link to this hack]

HACK
#44

Share a PDF Network Printer with Samba
Share a PDF printer with your entire network using Ghostscript, Samba, and Linux
[Discuss (1) | Link to this hack]

HACK
#45

Print to Image and Other Rasterizing Options
Thumbnail the cover or rasterize the entire document
[Discuss (0) | Link to this hack]

HACK
#46

Print to SVG
Create SVG as easily as PDF using pstoedit, and then embed it into your web page
[Discuss (0) | Link to this hack]

HACK
#47

Print Over the Internet
Print via HTTP by submitting your print streams as HTML form data
[Discuss (0) | Link to this hack]

HACK
#48

Create a PDF Album of Your Digital Pictures
Quickly prepare your photos to share with family and friends
[Discuss (0) | Link to this hack]

HACK
#49

Print to Fax on Windows
Treat fax machines like remote printers instead of remote copiers
[Discuss (0) | Link to this hack]

HACK
#50

Convert Incoming Faxes to PDF on Linux
Wrap an incoming fax in PDF and deliver it by email
[Discuss (0) | Link to this hack]

Manipulating PDF Files

HACK
#51

Split and Merge PDF Documents (Even Without Acrobat)
You can create new documents from existing PDF files by breaking the PDFs into smaller pieces or combining them with information from other PDFs
[Discuss (1) | Link to this hack]

HACK
#52

Encrypt and Decrypt PDF (Even Without Acrobat)
Restrict who can view your PDF and how they can use it
[Discuss (0) | Link to this hack]

HACK
#53

Add PDF Encryption Actions to Windows Context Menus
Apply or remove encryption from a given PDF with a quick right-click
[Discuss (0) | Link to this hack]

HACK
#54

Add Attachments to Your PDF (Even Without Acrobat)
Include live data that your readers can unpack and use
[Discuss (0) | Link to this hack]

HACK
#55

Easily Attach Your Document's Tables
Pack your document's essential information into its PDF edition
[Discuss (0) | Link to this hack]

HACK
#56

Add PDF Attachment Actions to Windows Context Menus
Pack or unpack PDF attachments from the Windows File Explorer with a quick right-click
[Discuss (0) | Link to this hack]

HACK
#57

Create a Traditional Index Section from Keywords
Add a search feature to your print edition
The Code
[Discuss (0) | Link to this hack]

HACK
#58

Rasterize Intricate Artwork with Illustrator or Photoshop
When distributing a PDF online, some vector drawings outweigh their usefulness
[Discuss (0) | Link to this hack]

HACK
#59

Crop Pages for Clarity
Aggressive page cropping ensures maximum on-screen clarity
[Discuss (0) | Link to this hack]

HACK
#60

Refry Before Posting Documents Online
Run your assembled PDF through Acrobat Distiller to reduce its file size. In Acrobat 6, try PDF Optimizer
[Discuss (0) | Link to this hack]

HACK
#61

Copy Features from One PDF to Another
Restore bookmarks, annotations, and forms after refrying your PDF
[Discuss (0) | Link to this hack]

HACK
#62

Polish Your PDF Edition
Little things can make a big difference to your readers
[Discuss (0) | Link to this hack]

HACK
#63

Add and Maintain PDF Bookmarks
Bookmarks greatly improve document navigation. Adding them is pretty easy
[Discuss (0) | Link to this hack]

HACK
#64

Get and Set PDF Metadata
Add document information to your PDF, even without using Acrobat
[Discuss (2) | Link to this hack]

HACK
#65

Add a Web-Style Navigation Bar to PDF Pages
Ensure that readers see your essential links
[Discuss (0) | Link to this hack]

HACK
#66

Copy-Protect Your PDF
Control how far your document can wander by making it difficult to copy
[Discuss (0) | Link to this hack]

HACK
#67

Support Online PDF Reading
Serve PDF pages on demand and spare readers a long download
[Discuss (0) | Link to this hack]

HACK
#68

Force PDF Download Rather than Online Reading
Prevent your online PDF from appearing inside the browser
[Discuss (0) | Link to this hack]

HACK
#69

Hyperlink HTML to PDF Pages
Take readers directly to the information they seek
[Discuss (0) | Link to this hack]

HACK
#70

Create an HTML Table of Contents from PDF Bookmarks
Give web surfers an inviting HTML gateway into your PDF
[Discuss (0) | Link to this hack]

HACK
#71

PDF Web Skins
Split a PDF into pages and frame them in HTML, where the fun begins
[Discuss (0) | Link to this hack]

HACK
#72

Share PDF Comments Online (Even Without Acrobat)
Use our PDF skins to add commenting features to PDF pages
[Discuss (0) | Link to this hack]

HACK
#73

Tally Topic Popularity
Organize PDF page hits by document headings to get a sense of what readers like best
[Discuss (0) | Link to this hack]

Dynamic PDF

HACK
#74

Collect Data with Online PDF Forms
Turn your electronic document into a user interface and collect information from readers
[Discuss (0) | Link to this hack]

HACK
#75

Serve Filled-Out PDF Forms
Populate online PDF forms with known data
[Discuss (0) | Link to this hack]

HACK
#76

Drive PDF Forms with Your Data
Convert your data into FDF so that Acrobat or Reader can merge it with a PDF form
The Code
[Discuss (0) | Link to this hack]

HACK
#77

PDF Form-Filling Sessions
Walk your users through the form-filling process
[Discuss (0) | Link to this hack]

HACK
#78

Permanently Merge a PDF Form and its Data
Provide online users with a copy of their completed form to save
[Discuss (0) | Link to this hack]

HACK
#79

Tool Up with pdftk
Take control of your PDF with pdftk
[Discuss (1) | Link to this hack]

HACK
#80

Decipher and Navigate PDF at the Text Level
Turn obfuscated PDF code into transparent data so you can work with it directly
[Discuss (0) | Link to this hack]

HACK
#81

Edit PDF Code Freely
Take control of PDF code by mastering its XREF table
[Discuss (2) | Link to this hack]

HACK
#82

Integrate pdftk with gVim for Seamless PDF Editing
Turn gVim into a PDF editor
[Discuss (0) | Link to this hack]

HACK
#83

Modify PDF Hyperlinks at Serve-Time
Add live session data to your PDF on its way down the chute
The Code
[Discuss (0) | Link to this hack]

HACK
#84

Tailor PDF Text at Serve-Time
Create a PDF template that you can populate as it is served
The Code
[Discuss (1) | Link to this hack]

HACK
#85

Use HTML to Create PDF
Format your content in HTML and then transform it into PDF
[Discuss (0) | Link to this hack]

HACK
#86

Use Perl to Create PDF
Create or modify PDF with a Perl script
[Discuss (6) | Link to this hack]

HACK
#87

Use PHP to Create PDF
Generate PDF from within your PHP script
[Discuss (0) | Link to this hack]

HACK
#88

Use Java to Create PDF
Generate PDF from within your Java program
[Discuss (0) | Link to this hack]

HACK
#89

Assemble Pages and Serve PDF
Collate an online document at serve-time
[Discuss (0) | Link to this hack]

HACK
#90

Superimpose PDF Pages
Merge your PDF pages with a background letterhead, form, or watermark
[Discuss (0) | Link to this hack]

HACK
#91

Generate PDF Documents from XML and CSS
Produce PDF documents for XML documents styled with CSS using YesLogic Prince
[Discuss (0) | Link to this hack]

HACK
#92

Create PDF with XSL-FO and FOP
Use Apache's FOP engine together with XSL-FO to generate PDF output
[Discuss (0) | Link to this hack]

Scripting and Programming Acrobat

HACK
#93

Modify or Convert Batches of Documents
Automate repetitive tasks using Acrobat, such as converting folders of Word documents to PDF
[Discuss (0) | Link to this hack]

HACK
#94

Script Acrobat Using Visual Basic on Windows
Drive Acrobat using VB or Microsoft Word's Visual Basic for Applications (VBA)
The Code
[Discuss (0) | Link to this hack]

HACK
#95

Script Acrobat Using Perl on Windows
Install Perl and use it instead of Visual Basic to drive Acrobat
The Code
[Discuss (0) | Link to this hack]

HACK
#96

Customize Acrobat Using JavaScript
Create custom Acrobat menu items and batch processing scripts
[Discuss (5) | Link to this hack]

HACK
#97

Tool Up for Acrobat Plug-In Development
Compile Acrobat plug-ins on Windows using GCC
[Discuss (0) | Link to this hack]

HACK
#98

Explore the Acrobat SDK Documentation and Examples
Look under Acrobat's hood, and explore the possibilities
[Discuss (0) | Link to this hack]

HACK
#99

Use Acrobat Plug-Ins to Extend PDF
The Acrobat API gives you the power to adapt PDF to your needs
[Discuss (0) | Link to this hack]

HACK
#100

PostScript and PDF Games
Have some fun, thanks to PostScript and PDF programming
[Discuss (0) | Link to this hack]


O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.