O'Reilly logo

Programming Web Graphics with Perl and GNU Softwar by Shawn Wallace

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the PostScript Modules on the Web

As an example, let’s design a web page for an online record label. The record label, Apocabilly Records, ships every purchase with a shipping invoice that until now had been created as the merchandise was shipped. Our web page will process the order, and create a PostScript shipping invoice all at once.

The web page will take information submitted from an HTML form and call a script called processorder.cgi, which will log the order in some sort of database and create the shipping invoice. The web page that the customer would see is shown in Figure 11.4. It is assumed that prior to this point, some sort of shopping cart script was used to catalog the user’s selections as he navigated the site.

The HTML code for this web page would look something like the code below. Notice the FORM element with fields to retrieve the customer’s name, address, city/state/zip, and the hidden text fields containing the merchandise order and the total amount of the purchase. These fields were created by our hypothetical shopping cart script and will be passed on to the processorder.cgi script upon submittal of the form for inclusion in the final shipping invoice.

<HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html"> <TITLE>Apocabilly Records Order Form</TITLE> </HEAD> <BODY> <TABLE CELLSPACING=0 BORDER=0> <TR><TD VALIGN="TOP"> <P> <IMG SRC="apocabilly2.gif" WIDTH=287 HEIGHT=96 ALT="Apocabilly Records, Since 1998></P> </TD> <TD VALIGN="TOP"> <H1>Order ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required