PDF In-Depth

PDF templates - the invisible paper

October 19, 1999

Advertisement
Advertisement
 

Welcome to the PDF Templates kit. This kit consists of two files. The Template Interface, and a second PDF file which is a sample of invisible PDF paper along with the PostScript code snippet used to create it. You should download these now, so that you can read along with me.

This demo is functional, but is of little real world value as it presently stands. Its purpose is to provide you with an instructional sample (templates, form fields, commented javascripts, interface) and most of the information needed to design your own system to function at the local level (from your hard drive). This demo does NOT make use of overlay templates and invisible PDF paper. See the notes attached to the invisible paper sample for instructions on spawning overlay templates.

Developing a web based template system involves much more than is represented here, and is beyond the scope of this demo. See my template manual for more information on web based systems.

It's not going to work with Reader

IMPORTANT: This demo will not work with Acrobat Reader! If you don't know why then go read my article about it.

Also, combining PDF 1.2 with PDF 1.3 for this type of workflow is not recommended. For reasons I cannot yet explain, strange form field behavior can sometimes result with this mixture.

Consistency is required

This demo uses three different page sizes, all in "landscape" orientation. If you generate any of these pages from the hidden templates and then import "portrait" orientation pages with the Replace Pages command, the spawned form fields will not align themselves with the new pages (they will be rotated 90 degrees). Therefore it is important to use pages that are oriented the same way when invoking the "Replace Pages" command. Doing otherwise can create all sorts of strange behavior, especially with text fields. Of course you can create any size of page template(s) you need with whatever enhancements your heart, or boss desires. Just be certain that orientation is consistent. For those who want to push PDF's limits, this might be a way to create form fields with vertical text. It does work, but I can't confirm how stable or portable it is at this point.

This demo is set up to generate the enhancements "before" importing the pages to be enhanced. This workflow can be changed. For example you could import the pages "first" and "then" generate the required enhancements with "overlay" templates. See the sample invisible PDF paper file for the necessary code to generate the required invisible paper for overlay templates. This is essential when overlaying form fields from templates onto an existing PDF page(s), otherwise the template page (PDF paper) itself will cover the page it is being spawned on top of. Just think of overlaying clear sheets of acetate versus overlaying opaque sheets of paper (see help file, by placing your cursor over the question mark).

Understand the PDF coordinate system

To use templates effectively, it's critical that you understand the PDF page coordinate system. It DOES NOT follow the conventions of the English language as most people would assume. PDF pages start at the bottom left hand corner of the page. So do PDF templates. This is very important to consider when designing "overlay" templates because the spawned template(s) will align themselves with the PDF page(s) they are being spawned into, starting at the bottom left hand corner of the page. Therefore, if your template is bigger than the page it is being spawned into, any excess will run off the top of the recepient PDF page(s) (not the bottom as one would assume). Nothing can be done to change this behavior, and this is not a problem for properly designed templates and documents (see help file, by placing your cursor over the question mark).

There are many other types of enhancements that can be applied with this type of system. Keep in mind that this demo is designed to run locally with the templates embedded in this document, and is not intended for "real world" use without extensive modifications. This same concept could be used to generate enhancements over the internet or an intranet and without the need to embed the templates in the file. This of course would involve many other factors not covered by this demo.

Something else to consider is how to get rid of the interface itself after you are done with it. It is very easy to just delete it using a button or menu command as this interface suggests.

What to delete?

You will notice when clicking the DELETE button in this demo that it actually invokes the Extract Pages command! The DELETE button can be configured to use any menu command that Acrobat makes available. Choose the command that best suites your needs.

By invoking the Delete Pages command you will only remove the interface page from the file, not the hidden templates themselves. In situations where the templates are large (file size wise) or where it is important to keep the resulting file size to a minimum, this is not the best way to proceed. Instead I suggest extracting the enhanced pages and saving them as a new PDF file. This is a better method for keeping file sizes as small as possible.

The big yellow question mark will cause an online help file to appear by using the Show/Hide Field action. Make your PDF enhancer as useful as possible by including a good help file.

Don't play with the gauge!

This demo is left unprotected so that you can study every part of it. Feel free to make use of any scripts or concepts you find, but please be kind and don't steal my interface design. If you like the pipe design and would like one of your own, or need a custom built PDF enhancer I will gladly make one up for you for a reasonable price. And don't play with the gauge!

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Quick PDF Library

Get products to market faster with this amazing PDF developer SDK. Over 900 functions and an equally...

Download free demo

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
Platinum Sponsor





Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.

Features

Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.