Tuesday, January 27, 2009

Adding Headers and Footers to a PDF Document

Acrobat 6 provides a new feature that enables you to add header and footer information (such as document title, date, time, or page numbers) to the top and bottom margins in a PDF document. This feature is especially useful when editing PDF documents that weren’t created using PDFMaker 6.0, which has the ability to convert header and footer information from the original document. To add a header or footer to your PDF document, follow these steps:

  1. Choose Document>Add Headers & Footers. The Add Headers & Footers dialog box opens, as shown in Figure.
  2. Click the Header or Footer tab, depending on which element you want to add to your PDF document. The procedure is the same for either option.
  3. Click in one of the three alignment boxes (on the left, center, or right at the top of the dialog box) to specify where the header/footer information is displayed in the PDF document. Note that these boxes correspond to the Align buttons and can be selected via these buttons as well.
  4. Choose a font and font size in the appropriate drop-down list.
  5. Choose a date style in the Style drop-down list in the Insert Date section of the dialog box and click the Insert button to insert the date in a header/footer.
  6. Choose a page number style in the Style drop-down list in the Insert Page Number section of the dialog box and click the Insert button to insert page numbers in a header/footer.
  7. Enter text in the Text box in the Insert Custom Text section of the dialog box and click the Insert button to insert your own text in a header/footer.
  8. Select from the options in the Page Options area of the Add Headers & Footers dialog box as follows:
  • Page Range: Select Apply to All Pages or Apply to Page Range in the drop-down list to specify on which pages the header/footer appears. If you select Apply to Page Range, specify the page range in the From and To text boxes below.
  • Alternation: Choose either Even Pages Only or Odd Pages Only in the drop-down list to specify the display of the header/footer on even or odd pages or choose Do Not Alternate to bypass this feature.
  • Margins: Specify white space around the header/footer either by clicking the spinner buttons or by entering values in the text boxes in the Margins area.
  1. When you’re finished setting up a header/footer, click the Preview button to preview your header/footer and then click OK to return to the Add Headers & Footers dialog box.
  2. Click OK to insert your new header or footer.

Headers and footers can be edited in a number of ways by selecting their Date, Page Number, or Custom Text elements in the alignment boxes in which they appear and then using the Remove and Insert buttons. For example, to change the position of a header/footer element, select the Date, Page Number, or Custom text element in the alignment box that it appears in, and then click the appropriate Align button to change its position. To delete a selected element, click the Remove button. After deleting an unwanted header/footer element, you can then create new ones by specifying Date, Page Number, or Custom Text parameters and using the Insert and Align buttons to position them in the header/footer.
You can Undo and Redo headers and footers created in a single session, meaning any you’ve created before clicking OK to close the Add Headers & Footers dialog box, by choosing Edit>Undo Headers/Footers or Edit>Redo Headers/Footers. If you created headers or footers at different times, you can repeat these commands to Undo or Redo headers/footers from previous Task sessions.

2 comments:

digital certificate said...

I am new to creating pdf files and was looking for a way to add the page numbers to the files.Also I have to add file name to the header of every page.Your blog made it easy for me.Thanks

Sheharyar said...

You can add header and footer to the pdf document with Aspose.PDF for Java Library. You will find many other features that this library offers which developers can use in their application.