Thursday, February 28, 2008

Copying Buttons Across All Pages

Activate the Button Tool (Acrobat 6) or the Form Tool (Acrobat 5), hold down the Shift key, and select each button until all of them are selected. Right-click the selection and choose Duplicate . . . . Enter the desired page range and click OK. Your navigation bar now should exist on those pages, too. Page through your document to ensure they are positioned properly.

How to Style Buttons and Add Graphics?

By default, buttons are plain, gray rectangles. Change a button's background and border using the Appearance tab in its properties dialog; you can even make a button transparent. Change a button's text label using the Options tab.

The Options tab also enables you to select a graphical icon. Change the Layout: to include an Icon and then click Choose Icon. You can use a bitmap, a PostScript drawing (Acrobat 6), or even a PDF page as a button icon.

Consider creating a no-op graphical button as a background to your other (transparent) buttons. This can be easier than trying to split a single navigation bar graphic into several pieces. Just make sure the active buttons end up on top of the graphic layer; otherwise, they won't work. Do this by creating the graphic layer before creating any of the active buttons, or by giving the graphic layer a lower position in the tabbing order.

Alter form field tab order in Acrobat 6.0.1 by activating the Select Object Tool (Tools >Advanced Editing >Select Object Tool), selecting Advanced >Forms >Fields >Set Tab Order, and then clicking each field in order. Alter form field tab order in Acrobat 5 by activating the Form Tool, selecting Tools >Forms >Fields >Set Tab Order, and then clicking each field in order.

To prevent a button from printing, open its properties and select the General tab (Acrobat 6) or the Appearance tab (Acrobat 5). Change Form Field: to Visible but Doesn't Print.

How to Add a Web-Style Navigation Bar to PDF Pages?

Ensure that readers see your essential links.

Styles used on the Web suggest that readers love navigation bars
Creating a PDF navigation bar in Acrobat and then duplicating it across several (or all) document pages is easy. Links can open external web pages or internal PDF pages. Add graphics and other styling elements to make it stand out. Disable printing to prevent it from cluttering printed pages. All of this is possible with PDF form buttons.

Create Buttons and Set Actions
Create and manage buttons using the appropriate Acrobat tool. In Acrobat 6, activate the Button Tool (Tools >Advanced Editing >Forms >Button Tool), then click and drag out a rectangle. Release the mouse and the Button Properties dialog opens. Select the Actions tab and click the Select Action drop-down box. Choose Go to a Page in this Document or Open a Web Link and click Add . . . . Another dialog opens where you can enter destination details. Click OK and the action should be added to the button's Mouse Up event. Click Close and your button should be functional. Test it by selecting the Hand Tool and clicking the button.

Improve your button's precision by activating Snap to Grid from View >Snap to Grid. Alter its subdivisions from the Units and Guides (Acrobat 6) or Layout Grid (Acrobat 5) preferences.

In Acrobat 5, select the Form Tool, then click and drag out a rectangle. Release the mouse and a Field Properties dialog opens. Enter the button's name (it can be anything, but it must be unique) and change the Type: to Button. Click the Actions tab, select Mouse Up, and click Add . . . . Curiously, you do not have the choice to go to a page within the document. Instead, select JavaScript and enter this simple code; JavaScript page numbers are zero-based, so this example goes to page 6, not page 5:

this.pageNum = 5;

Or, select World Wide Web Link if you want the button to open a web page. Click Set Action and then OK, and your button should be functional. Test it by selecting the Hand Tool and clicking the button.

Acrobat World Wide Web links should be preceded by http://. Otherwise, they won't work in older versions of Acrobat/Reader.

Saturday, February 23, 2008

Set Document Metadata

Pdftk can take a plain-text file of these same key/value pairs and update a PDF's Info dictionary to match. Currently, it does not update the PDF's XMP stream. The command would look like this:

pdftk mydoc.pdf update_info new_info.txt output mydoc.updated.pdf

This will add or modify the Info keys given by mydoc.new_data.txt. Note that the output PDF filename must be different from the input. To remove a key/value pair, simply pass in the key/value with an empty value, like so:

InfoKey: MyDataKey

InfoValue:

Use pdftk to strip all Info and XMP metadata from a document by copying its pages into a new PDF, like so:

pdftk mydoc.pdf cat A output mydoc.no_metadata.pdf

The PDF specification defines several Info fields. Be careful to use these only as described in the specification. They are Title, Author, Subject, Keywords, Creator, Producer, CreationDate, ModDate, and Trapped.

Get Document Metadata

To create a plain-text report of PDF metadata, use pdftk's dump_data operation. It will also report PDF bookmarks and page labels, among other things. The command looks like this:

pdftk mydoc.pdf dump_data output mydoc.data.txt

Metadata will be represented as key/value pairs, like so:

InfoKey: Creator

InfoValue: Acrobat PDFMaker 6.0 for Word

InfoKey: Title

InfoValue: Brian Eno: His Music and the Vertical Color of Sound

InfoKey: Author

InfoValue: Eric Tamm

InfoKey: Producer

InfoValue: Acrobat Distiller 6.0.1 (Windows)

InfoKey: ModDate

InfoValue: D:20040420234132-07'00'

InfoKey: CreationDate

InfoValue: D:20040420234045-07'00'

Another tool for reporting PDF metadata is pdfinfo, which is part of the Xpdf project (http://www.foolabs.com/xpdf/). In addition to metadata, it also reports page sizes, page count, and PDF permissions . Running pdfinfo mydoc.pdf yields a report such as this:

Title: Brian Eno: His Music and the Vertical Color of Sound

Author: Eric Tamm

Creator: Acrobat PDFMaker 6.0 for Word

Producer: Acrobat Distiller 6.0.1 (Windows)

CreationDate: 04/20/04 23:40:45

ModDate: 04/22/04 14:39:30

Tagged: no

Pages: 216

Encrypted: no

Page size: 522 x 756 pts

File size: 1126904 bytes

Optimized: yes

PDF version: 1.4

Use pdfinfo's options to fine-tune its behavior. Use its -meta option to view a PDF's XMP stream.

Add document information to your PDF, even without using Acrobat.

Traditional metadata includes things such as your document's title, authors, and ISBN. But you can add anything you want, such as the document's revision number, category, internal ID, or expiration date. PDF can store this information in two different ways: using the PDF's Info dictionary or using an embedded Extensible Metadata Platform (XMP) stream. When you change the PDF's title, authors, subject, or keywords using Acrobat, it updates both of these resources. Acrobat 6 also enables you to export or import PDF XMP datafiles. Visit http://www.adobe.com/products/xmp/ to learn about Adobe's XMP.

In Acrobat 6, view and update metadata by selecting File >Document Properties . . . >Description or Advanced >Document Metadata . . . . In Acrobat 5, select File >Document Properties >Summary. Save your PDF after making changes to the metadata.

Pdftk currently reads and writes only the metadata in a PDF's Info dictionary. However, it does not restrict you to just the title, authors, subject, and keywords. This solves the basic problem of embedding information into a PDF document; pdftk allows you to add custom metadata fields to PDF as needed. pdftk is free software.

Xpdf's (http://www.foolabs.com/xpdf/) pdfinfo reports a PDF's Info dictionary contents, its XMP stream, and other document data. pdfinfo is free software

Tuesday, February 19, 2008

How to move PDF bookmark?

New bookmarks don't always appear where you want them. Select a bookmark (use a right-click to keep from activating it), click, and drag it to where it belongs. A little cursor will appear, indicating where the bookmark would go if you dropped it. You can indent a bookmark by dragging it to the left (Acrobat 6) or the right(Acrobat 5) of the intended parent. The little cursor will jump, showing you where the bookmark would go.

Move an entire block of bookmarks by first creating a multiple selection. In Acrobat 6, the order in which you select bookmarks is the order they will have after you move them, which can be a surprise. To preserve their order, add bookmarks to your multiple selection from top to bottom.

Select the first bookmark, hold down the Shift key, and then select the final bookmark in the block. Hold down the Ctrl key and click a bookmark to add or remove it from your selection. Click the selection and drag it to its new location.

How to Add PDF Bookmark?

Ideally, your document's headings would have been turned into PDF bookmarks when it was created . If you ended up with no bookmarks or the wrong bookmarks, you can add or change them using Acrobat. Here are a few tricks to speed things up.

Create a bookmark to the current view using the Ctrl-B shortcut (Command-B on the Macintosh). Then, type a label into the new bookmark and press Enter. Note that current view means the current page, current viewing mode (e.g., Actual Size, Fit Width, or Fit Page), or current zoom. For example, if you want a bookmark to fill the page with a specific table, zoom in to that table before creating the bookmark. When quickly creating bookmarks to a document's headings, I simply use the Fit Page viewing mode.

Every bookmark needs a text label, and this label usually corresponds to a document heading. Instead of typing in the label, use the Text Select tool to select the heading text on the PDF page. When you create the bookmark (Ctrl-B or Command-B), the selected text appears in the label. Review this text for errors.

Page Orientation and Cropping

Quickly page through your document from beginning to end, making sure that your page cropping didn't chop off any data. Also check for rotated pages. Adjust rotated pages to a natural reading orientation by selecting Document >Pages>Rotate (Acrobat 6) or Document>Rotate Pages (Acrobat 5).

Rotating and cropping PDF pages can affect how they print. The user should select "Auto-rotate and center pages" from the Print dialog box when printing PDF to minimize

Friday, February 15, 2008

Managing the Document Title, Author, Subject, and Keywords

Document metadata doesn't jump out at readers the way bookmarks and logical page numbers do, but your readers can use it to help organize their collections. Plus, it looks pretty sharp to have them properly filled in. The title and author fields are often filled automatically with nonsense, such as the document's original filename (e.g., Mockup.doc) or the typesetter's username.

You can disable the automatic metadata added by Distiller. Open Distiller and edit your profile's settings. Uncheck Advanced >Preserve Document Information from DSC, and click OK.

In Acrobat 6, view and update this information by selecting File >Document Properties . . . >Description or Advanced >Document Metadata . . . . In Acrobat 5, select File >Document Properties >Summary.

Little things can make a big difference to your readers.

Most creators don't use these basic PDF features, yet they improve the reading experience and they are easy to add.

Document Initial View
If your PDF has bookmarks, set your PDF to display them when the document is opened. Otherwise, your readers might never discover them. You can change this, and other settings, from the PDF's document properties. In Acrobat 6, select File >Document >Properties . . . >Initial View to access these setting. In Acrobat 5, select File >Document Properties >Open Options.

Logical Page Numbering
Open your PDF in Acrobat and go to page 1. If your PDF doesn't have logical page numbering, Acrobat thinks its first page is "page 1." Yet your document's "page 1" might actually fall on Acrobat's page 6. Imagine your readers trying to make sense of this, especially when your document refers them to page 52 or when they decide to print pages 42-47.

Synchronize your document's page numbering with Acrobat/Reader by adding logical page numbers to your PDF. In Acrobat 6, select the Pages navigation tab (View >Navigation Tabs >Pages), click Options, and select Number Pages . . . from the drop-down menu. In Acrobat 5, access the Page Numbering dialog box by selecting Document >Number Pages . . . .

Start from the beginning of your document and work to the end, to minimize confusion. If numbering gets tangled up, reset the page numbers by selecting All Pages, Begin New Section, Style: 1, 2, 3, . . . , Prefix: (blank), Start: 1, and clicking OK.

If your document has a front cover, you can give it the logical page number Cover by setting its Style to None and giving it a Prefix of Cover.

Does your document have front matter with Roman-numeral page numbers? Advance through your document until you reach page 1. Go back to the page before page 1. Open the Page Numbering dialog. Set the page range From: field to 1. Set the Style to "i, ii, iii, . . . ," and make sure Prefix is empty. Click OK. Now, the pages preceding page 1 should be numbered "i, ii, . . . ," and page 1 should be numbered 1.

Go to the final page in your PDF and make sure the numbering still matches. Sometimes people remove blank pages from a PDF, which causes the document page numbers to skip. If you plan to remove blank pages from your PDF, apply logical page numbering beforehand.

How to Copy Features from One PDF to Another?

Restore bookmarks, annotations, and forms after refrying your PDF.

You just refried your high-fidelity PDF to create a lightweight, online edition and Distiller burned off the nifty PDF navigation features and forms. Let's combine the old PDF's navigation features and forms with the new PDF's pages to get a lightweight, interactive PDF. Here's how:
  1. Open the old PDF file (the one with the bookmarks, links, or form fields) in Acrobat.
  2. In Acrobat 6, select Document >Pages >Replace. In Acrobat 5, select Document >Replace Pages from the menu.
  3. A file selector dialog opens. Select the new PDF file (the one with no PDF features).
  4. The Replace Pages dialog opens, requesting which pages to replace. Enter the first and last page numbers of your document.
  5. When it is done, select Save As . . . to save the resulting PDF into a new file.
  6. Test the resulting PDF to make sure all your interactive features came through successfully.
Using the Replace Pages feature like this to separate the visible page from its interactive features can be pretty handy. If you ever need to transfer a page and its interactive features, use the Extract Pages, Insert Pages, and Delete Pages functions.

Sunday, February 10, 2008

The Best Time to Refry Using Distiller

The best time to refry a PDF using Distiller (as opposed to the PDF Optimizer) is after you have assembled it, but before you have added any PDF features. Here is the sequence I typically use when preparing a PDF for online distribution:
  1. Assemble the original PDF pages and Save As . . . to a new PDF.
  2. If page sizes are wildly irregular, crop them .
  3. Refry the original PDF document and compare the resulting refried PDF to the original. Adjust Distiller settings as necessary and choose the best results.
  4. Crop and rotate the refried PDF pages as needed.
  5. If the original document had bookmarks or other PDF features, copy them back to the refried PDF] .
  6. Add PDF features or finishing touches .
  7. Save again using Save As . . . to compact the PDF. In Acrobat 6, save the final PDF by selecting File >Reduce File Size . . . and set the compatibility to Acrobat 5.

Refrying with PDF Optimizer

PDF Optimizer (Advanced >PDF Optimizer . . . ) performs this service much more conveniently. Its settings resemble Distiller's, and they enable you to downsample images, remove embedded fonts, or remove unwanted PDF features. You can also change the PDF compatibility to Acrobat 5. Click OK and it will create a new PDF for you. Compare this new PDF with the original and decide whether to keep it or try again. The best time to use the PDF Optimizer is just before you put the PDF online.

To simply make your Acrobat 6 PDF compatible with Acrobat 5, select File >Reduce File Size . . . instead of the PDF Optimizer.

Refry PDF for online purposes

You started with two or three PDFs, combined them, and then cropped them. Before going any further, consider running your assembled PDF through Distiller. This refrying can reduce duplicate resources and ensures that your PDF is optimized for online reading. It also gives you a chance to improve your PDF's compatibility with older versions of Acrobat and Reader. In Acrobat 6, you can conveniently refry a PDF without Distiller by using the PDF Optimizer feature. Even so, distilling a PDF can yield better results than the PDF Optimizer can.

Common Refrying with Distiller
Refrying traditionally has been done with a simple tips, reprinting the PDF out to Distiller, which creates a new PDF file:

  1. Save your PDF in Acrobat using the File> Save As . . . function. Acrobat will consolidate its resources as much as it can. Acrobat 6 does this more aggressively than Acrobat 5 does.
  2. Open the Acrobat Print dialog (File >Print . . . ) and select the Adobe PDF printer (Acrobat 6) or the Distiller printer (Acrobat 5).
  3. Set the Distiller profile by selecting Properties Adobe >PDF Settings and adjusting the Default Settings (Acrobat 6) or Conversion Settings (Acrobat 5) drop-down box. For online distribution, consider these profiles: eBook, Standard, Screen, or Smallest File Size.
  4. If you cropped your PDF, you should set the Print page size to match your PDF page size. In the Acrobat 6 Print dialog, adjust Properties >Adobe PDF >Settings Adobe PDF Page Size to fit your page. Use the Add Custom Page . . . button if you can't find your page size among the current options. In the Acrobat 5 Print dialog, adjust Properties >Layout tab >Advanced . . .>Paper Size to fit your page. Select PostScript Custom Page Size if you can't find your page size among the current options.
  5. Print to Distiller. Do not overwrite your original PDF.
  6. Review the resulting PDF. Is its file size smaller? Is its fidelity acceptable?
  7. Reapply page cropping as needed. You might need to rotate some pages.
  8. To restore bookmarks and other features .

Wednesday, February 6, 2008

Document Cropping Procedure

Does your document jog back and forth from one page to the next? Then you have page gutters. You will need to crop your even pages separately from your odd pages.

Find a representative page and crop it to your satisfaction using any combination of the Crop and BBOX tools. If your document has gutters, turn to the next page and give it the same treatment. Flip back and forth between these two pages as you work to remove the gutter, trying to get the pages to stop jogging back and forth.

When your representative page is cropped to your satisfaction, open the Crop Pages dialog by selecting the Crop tool and double-clicking the page. Set the page range to All Pages. If you are cropping even and odd pages separately, set the nearby drop-down box to Even Pages Only or Odd Pages Only depending on which page you currently have displayed. Click OK. Even and odd in this context refer to the physical page numbers (or page indexes) in your document, not the logical page numbers (or page labels).

Acrobat's Crop Tool

With Acrobat's Crop tool, you can draw a free-form crop region by clicking the page and dragging out a rectangle. Double-click this new region or simply double-click the page and the Crop Pages dialog opens. The Crop Pages dialog enables you to directly enter the widths you want to trim from each margin. You can also specify a range of document pages to crop according to these settings. The Remove White Margins setting sounds like just what we need, but it is inconsistent and it yields pages with irregular dimensions.

Using the Crop tool to draw a free-form region gives you an irregular page size that probably doesn't precisely center your content. The solution is to activate the Snap to Grid feature (View Snap to Grid). By default, this grid is set to three subdivisions per inch. A more useful setting might be four or eight subdivisions per inch.

In Acrobat 5, high-precision cropping requires using points instead of inches, because 1/8-inch increments get rounded to two decimals. In the File Preferences . . . Display dialog, change Page Units to Points. There are 72 points to an inch, or 9 points to 1/8 of an inch.

BBOX Acrobat Cropping Plug-In for Windows
BBOX is a simple tool I use in my PDF production. Download it from http://www.pdfhacks.com/bbox/, unzip, and copy pdfhacks_bbox.api into your Acrobat plug_ins folder. When you restart Acrobat, it will add a menu named Plug-Ins PDF Hacks BBOX.

The BBOX Auto-Crop feature crops as much as it can from the currently visible page. It trims away multiples of 1/8 inch (9 points), so the resulting page size isn't irregular. It tries to be smart, but it sometimes leaves margins that need additional cropping.

The Trim Page features enable you to trim 1/8 inch from the left or right page edges. If you go too far, use the Extend Page features to add 1/8 inch instead.

Sometimes 1/8-inch units are not fine enough to center a page. For these cases, we have the Bump Page features. These do not alter the page width, but appear to move the page one point at a time. They simply reduce the crop on one side and increase the crop on the other, giving you fine control over page centering.

Cropping Pages for Clarity

Aggressive page cropping ensures maximum on-screen clarity.

When viewing a PDF in Reader or Acrobat, the page is often scaled to fit its width or its height into the viewer window. This means you can make page content appear larger on-screen by cropping away excess page margins. Cropping has no effect on the printed page's scale, but it might alter the content's position on the printed page.
Acrobat's cropping tool can remove excess page margins. Use it in combination with our freely available BBOX Acrobat plug-in. These two tools make it easy to find the best cropping for a page and then apply this cropping to the entire document.

Saturday, February 2, 2008

Rasterize Drawings In-Place with Acrobat

First, make a backup copy of your PDF so that you can go back to where you started at any time.
Open your PDF in Acrobat and locate the drawing you want to rasterize. Activate the TouchUp Object tool (Tools >Advanced Editing >TouchUp Object, in Acrobat 6) and try to select the drawing. This usually requires patience and experimentation because one illustration might use dozens of separate drawing objects. And, it usually is tangled with other items on the page that you don't want to rasterize.
First, try dragging out a selection rectangle that encloses the artwork. If other, unwanted items get caught in your dragnet, try dropping them from your selection by holding down the Shift key and clicking them. If you missed items that you wanted to select, you can add them the same way: Shift-click. The Shift key is a useful way to incrementally add or remove items from your current selection. You can even hold down the Shift key while dragging out a selection rectangle. Items in the rectangle will be toggled in or out of the current selection, depending on their previous state.
If you accidentally move an item, immediately press Ctrl-Z (Edit >Undo) to restore it. If things ever get messed up, close the PDF without saving it and reopen it to start again.

Using Photoshop for Rasterizing Intricate Artwork

If you are using Photoshop instead of Illustrator, you won't have a chance to select the objects you want rasterized; Photoshop immediately rasterizes everything you selected in Acrobat. One advantage of using Photoshop is that it won't try to substitute fonts, as Illustrator sometimes does.

After your selection is made in Acrobat, right-click inside the selection and click Edit Objects . . . . Photoshop will open and ask you for a resolution. Enter a resolution (e.g., 300 pixels per inch), click OK, and the rasterized results will appear. Inspect the results to make sure the artwork retained adequate detail. If you like the results, save the Photoshop file. By default, it should save as PDF, but sometimes you must change the Format to PDF in the Save dialog. Before saving the file, Photoshop will ask which encoding to use (ZIP or JPEG). If you choose JPEG, you can also set its quality level. After saving the rasterized artwork in Photoshop, Acrobat will automatically update the PDF to reflect your changes. If you still like them, save the PDF in Acrobat. Otherwise, discard them by pressing Ctrl-Z (Edit>Undo) or by closing the PDF in Acrobat and starting over.

Using Illustrator for Rasterizing Intricate Artwork

After your selection is made in Acrobat, right-click inside the selection and click Edit Objects . . . . Adobe Illustrator will open and your selected material will appear. Now, you must select the items you want to rasterize. If your selection in Acrobat worked just right, you can simply select the entire page (Edit >Select All). If your original selection included unwanted items, carefully omit these items from this new selection. The Shift key works the same way in Illustrator as it did in Acrobat, as you assemble your selection.
After making your selection in Illustrator, select Object >Rasterize . . . and a dialog opens. Select a suitable color model (e.g., RGB) and resolution (e.g., 300 pixels per inch) and click OK. Inspect the results to make sure the artwork retained adequate detail. If you like the results, save and close the Illustrator file. Acrobat will automatically update the PDF to reflect your changes. If you still like them, save the PDF in Acrobat. Otherwise, discard them by pressing Ctrl-Z (Edit >Undo) or by closing the PDF and starting over.