Products   Support   Download   Contact

CREATING A LETTERHEAD FORM WITH SCRIPTSERVER® PAN

Contents | Index | About the Icons

Abstract

The ScriptServer® PAN Printing System (PAN) product supports advanced form creation and imaging capabilities. This memo describes one such technique.

Techniques Covered In This Memo

This memo covers the basics of creating a form which prints a background image on the first printed page only. The form will work with both plaintext as well as PostScript jobs, although some differences are noted. Setup of the form is discussed first. Differences between plaintext and PostScript jobs are discussed last. You may also find the following pages of interest:

Creating the Form

The form requires three resources. Create the resources and the form as follows. Each step will be described in detail in a separate following section:

  1. Create a Layout Resource with PAN Administration -> Resources -> create resource. The layout resource will control margins and placement when printing plain (ascii) text.
  2. Create an Image Resource with PAN Administration -> Resources -> upload form image. The image will become the letterhead which is printed on the first page only.
  3. Create a special Other Resource with PAN Administration -> Resources -> create resource. This will be what is termed the "rotor controller" resource, a PostScript language snippet which is unique to ScriptServer PAN.
  4. Create a Form with PAN Administration -> Manage forms -> create form and add the resources to it.

Creating the Layout Resource

The layout resource will control the placement of text on the printed pages; it will have no effect when printing PostScript jobs. In particular, the top margin will control how much room is left on the first page for the letterhead, without overprinting (you can if you wish use a full-page image, with some of it serving as a background watermark). In this example we have left 2 inches at the top of the page for the letterhead.

Creating the Image Resource

There is nothing particularly special about setup for the image resource, except that you wouldn't want to center image on page or scale to fit page.

Creating the Rotor Control Resource

The rotor controller is a PostScript snippet whose functionality is tied to specific capabilities of the PostScript which is generated by the ScriptServer PAN Printing System. It is a resource of type Other, and in this case it serves to:

To create the resource, create a new resource of type Other, and cut and paste the following PostScript code into it:


currentglobal true setglobal
    pan$global begin
    /BeginPageHook 
    {
       pan$global/PageCounter get 0 gt 
       {
          userdict/ssv$asciidict known 
          {
             ssv$asciidict /TM 754 put  % reset top margin
          } if
          userdict /pan$forms known     % disable form image
          {
             userdict /pan$forms get /image_rotor [-1] put
          } if
       } if
    }  def
    end % pan$global
setglobal

Putting It All Together: Creating the Form

The final step is to create a Form and add the resources to it. The resources should be added in the indicated order:

Differences between Plaintext (ASCII) and PostScript Print Jobs

For plaintext (ASCII) jobs, the text is flowed from page to page when it is converted to PostScript (unless there are explicit Form Feed characters as page delimiters). It is important to realize that less text will fit on the first page than on subsequent pages.

PostScript jobs will be imaged directly onto the the page. Therefore an allowance must be made for the letterhead when creating the PostScript. For instance if you are creating the document in a word processor, you will need to allow for the two inch margin on the first page yourself.

© 2020 GrayMatter Software Corporation