Pdfmarks: Links and Forms

NEW: (4/7/2001) I've uploaded a short article acro5new.pdf, a brief summary of some useful features of the new Acrobat 5 and the new PDF 1.4 Spec. I distilled this file using the Distiller 5.0; Acrobat or Reader 5.0 is needed to see the new features illustrated.

Note: The new pdfmark Reference manual for Acrobat 5.0 has been posted; the Acrobat 5 SDK has been posted as well, see the document entitled PDF: Changes from Version 1.3 to 1.4 for more details on what's new with the specification.

In Pdfmarks: Links and Forms I have attempted to bring to the reader the basic, the advanced and the more subtle techniques of creating hypertext links and form annotations for Adobe's Portable Document Format (PDF). But wait, there is an additional twist....

I am primariliy interested in promoting the use of TeX, the mathematical typesetting program, for creating fine quality PDF documents. TeX and PDF seem to be natural companions, they make an ideal team; in fact, my wife has coined the term AcroTeX to describe the interplay between TeX and Acrobat. Accordingly, in the many extensive and detailed examples contained in Links and Forms I have used TeX primitives and macros. PostScript programmers need not dispair though, you can easily strip away the TeX part to obtain the pure PostScript part of the examples.

The world of TeX is divided into two camps (actually, many different camps), but I'll declare only two: Those who use dvips and those who don't. I happen to fall into the second, much smaller camp. I use a commercial product by Y&Y called DVIPSone. Wanting to appeal to the widest possible TeX population, I was forced to download a fairly decent freeware system called MikTeX which uses dvips.

All macros have versions that are to be used with dvips, and versions to be used with DVIPSone. My apologies to the rest of the dvi-to-ps universe, but I have only limited time and resources. The macros are pure TeX, and not designed with any manifestation of LaTeX in mind; though, without doubt, all macros can be used with LaTeX.

These articles can and should be read in conjunction with Thomas Merz' own fine offering to the Acrobat community, The Pdfmark Primer. That work, as well as this one, comprise a very fine library of information on pdfmarks.

The files can be viewed on-line or off-line. There is only one example in forms.pdf that assumes you are on-line. The natural starting point is links.pdf wherein I introduce the basic macros that I use throughout the document pair. The file, examples/sample.pdf is just a target file for some of the examples in links.pdf.

Pdfmarks: Links and Forms:

You can download these files for viewing off-line. Just put the first two in a directory of your choice and create a subdirectory called examples and place the file sample.pdf in it.

Macro Files for Links and Forms:
For those who are inspired to try some of the examples yourself on your own system, here is a list of macro files that I used to create all links and form annotations.

  • links_m.tex: Used throughout links.pdf and forms.pdf
  • acroform.tex: Used in forms.pdf only. Needed to define the acroform dictionary.

Related Articles:

I would like to recognize Louis Vosloo of Y&Y, Inc for putting in his two-bits worth in this project. He explained some technical details concerning the inner workings of DVIPSone, and has always been a great support to me and my little projects.

Making the dvips verions of the macros work would not have been accomplished without the aid of Dr. David Wilson of Monash University, Australia. (Note: Also a Y&Y user.)

I would be very much interested in hearing of your reaction to these articles. Also, should you have any corrections, or suggestions about how to improve the presentation, please contact me. Do you have any experience with forms? Would be interested in communicating with you, maybe sharing knowledge and improving my techniques.

New! The Web.sty package referenced above has recently enhanced (5/1/99) to include many additional features: options for dvipsone, dvips, navibar (a navigational menu bar), a choice of styles of for the table of contents, etc. There is a companion package called Exerquiz.sty which defines environments for creating on-line exercises, short multiple choice quizzes (with/without solutions) and longer multiple choice quizzes that are graded using JavaScript. Acrobat 3.0 and Forms 3.5 or above are required. The two packages can be accessed at Web and Exerquiz Home page

I truely hope these articles are of some value to you.



Now I simply must get back to work!     

Other Sights at this Site:   

Last Update: 4/07/01


  • (4/7/01) Uploaded "What's New with Acrobat 5.0".
  • (2/13/99) Added a section on enhancing text in text fields in for forms section. The new material includes an additional example---not seen int the PDFZone.COM article ``Enhancing Text in Text Fields using Pdfmarks''---on how to get the line breaking correct when horizontal rescaling is used
  • (6/14/98) Added a new example of constructing a Radio Button Field. See the example entitled A Simple Method under the Button Field: Radio Buttons section in forms.pdf. This example is the method Sebastian Rahtz uses in hyperref.

Visitors since 4/19/98: