I second the recommendations to ditch PCL and go straight for
postscript.
Here's my take on a postscript form from CSV data. This is generated
by a
PERL script which transforms the CSV formatting into a postscript
array.
Since I also controlled the creation of the CSV files, I could get
away
with a very simple transform:
chomp;
s/^/{(/;
s/,/)(/g;
s/$/)}/;
print;
530(1)01:01 PM:sindex 0> cat
form.ps
%!
% persuade acrobat reader to obey the numbers
[ {Catalog} << /ViewerPreferences << /PrintScaling /None >> >> /PUT
pdfmark
/in {72 mul}def
/setup {
8.5 in 0 translate
90 rotate
/Palatino-Roman fs selectfont
} def
/pagenum 0 def
/showpagenum {
/pagenum pagenum 1 add def
X Y moveto 5 5 rmoveto
(page ) show
pagenum ( ) cvs show
} def
/nextpage {
showpagenum
showpage setup
} def
/box {
x y moveto
x Y lineto
X Y lineto
X y lineto
closepath stroke
} def
%/n 0 def
/hlines {
Y dy neg y {
dup
x exch moveto
X exch lineto
% /n n 1 add store
} for
stroke
} def
/hbars {
gsave
.94 setgray
Y dy -2 mul y {
dup
x exch moveto
w 0 rlineto
0 dy neg rlineto
w neg 0 rlineto
closepath
fill
} for
grestore
} def
/columns [ 1 3 div in 2.8 in 1 3 div in .7 in 1 3 div in
.4 in .4 in .4 in
.4 in .4 in .4 in
.4 in .4 in .4 in
.4 in .4 in .4 in
] def
/caption [ (Loc) (Item) (UOM) (SKU) (Par)
(O/H) (Order) (Usage)
(O/H) (Order) (Usage)
(O/H) (Order) (Usage)
(O/H) (Order) (Usage)
] def
/darkbars [ 5 8 11 14 ] def
/milkbars [ 7 10 13 16 ] def
/dobars {
{
1 add dup 1 sub columnab exch get
exch columnab exch get % x X
dup Y moveto % x X
y lineto % x
dup y lineto % x
Y lineto
closepath fill
} forall
} def
/vbars {
gsave
.82 setgray
darkbars dobars
.92 setgray
milkbars dobars
grestore
} def
/showcaptions {
x Y fs sub moveto
0 1 caption length 1 sub { %index
dup
gsave
2 0 rmoveto
caption exch get show
grestore
columns exch get
0 rmoveto
} for
} def
/vlines {
x Y moveto
columns {
0 rmoveto
gsave
0 h neg rlineto stroke
grestore
} forall
} def
/paintform {
hbars
vbars
box
hlines
vlines
showcaptions
} def
/w 0 columns {add} forall def
/x 1 in def
%/X 10 in def
/X x w add def
/y .5 in def
/Y 8 in def
/h Y y sub def
%/w X x sub def
/fs 9 def
/dy 12 def
/columnab [
x columns {
1 index add
} forall
] def
/doinv { % { {(...)(...)...} {...} }
x Y dy sub fs sub moveto
{ % { (...) (...) (...) (...) }
gsave
0 1 2 index length 1 sub { % {} i
gsave
2 0 rmoveto
2 copy get show
grestore
columns exch get 0 rmoveto
} for
pop
grestore
0 dy neg rmoveto
} forall
} def
setup
paintform
{
{(B)(BAG PASTRY CS/2000)(1cs)(277725)}
{(B)(CUP FOOD SAMPLING BX/500)(1cs)(1138282)}
{(B)(TISSUE PICKUP 6x10.75 CS/10000)(1cs)(128984)}
{(B)(TO GO FOOD BOX CS/250)(1cs)(190771)}
{(C)(BAG LG SHOPPER CS/200)(1cs)(277727)}
{(C)(BAG US SM HANDL SHOPPER CS/250)(1cs)(277726)}
{(D)(Customer Recovery Coupon (25ea limit))(25ea)(1102713)}
{(H1)(Lemonade 48oz)(6ea)(226008)}
{(H2)(JUICE APPLE 64OZ 6/cs)(1cs)(11007002)}
{(I1)(SYR COFF FRAP LIGHT 63OZ 4/CASE)(1cs)(11005901)}
{(I1)(SYRUP COFF FRAP 63OZ 4/CASE)(1cs)(11001665)}
{(I1)(SYRUP CRM FRAP 63OZ 4/CASE)(1cs)(11001666)}
{(I1)(Tazo Chai Concentrate)(12ea)(162670)}
{(I2)(Milk Soy HGL)(8ea)(520792)}
{(J)(EXTRACT FRSC V2 24/CS)(1cs)(11006133)}
{(J)(Mocha Bar 6/cs)(1cs)(140966)}
{(J)(Whip Cream Chargers)(36ea)(421448)}
{(K)(Splash Sticks 500/bag)(1bag)(1123193)}
{(L)(Syrup SF Vanilla)(6ea)(184537)}
{(L)(Syrup Vanilla)(12ea)(184504)}
{(M)(LARGE CAN LINER 28x45 CS/200)(1cs)(1117269)}
{(M1)(Syrup Cinnamon Dolce)(6ea)(184526)}
{(M1)(Syrup SF Cinnamon Dolce)(4ea)(319945)}
{(M2)(Syrup Caramel)(6ea)(184512)}
{(M2)(Syrup SF Caramel)(4ea)(368077)}
{(N1)(Syrup Hazelnut)(6ea)(184523)}
{(N1)(Syrup SF Hazelnut)(6ea)(184515)}
{(N2)(Chocolate Chips)(6ea)(504168)}
{(N2)(Matcha Powder)(6ea)(994060)}
{(O)(Juice Orange Mango 64oz)(6ea)(11004842)}
{(O)(Strawberry Juice 48oz)(6ea)(11003817)}
{(P)(Filters Cone Brewing #4 Paper (100/cs))(1cs)(11006705)}
{(Q)(PP ICB(Terraza Blend) 9oz)(28ea)(195704)}
{(Q)(Tea Iced Black)(1cs)(1133214)}
{(Q)(Tea Iced Passion)(1cs)(1133216)}
{(Q)(Tea Iced Zen)(1cs)(1115790)}
{(R)(Awake Full Leaf Tea 120/cs)(1cs)(1188667)}
{(R)(Calm Full Leaf Tea 120/cs)(1cs)(11001511)}
{(R)(Chai Full Leaf Tea 120/cs)(1cs)(11001507)}
{(R)(China Green Tips Full Leaf Tea 120/cs)(1cs)(11001509)}
{(R)(Earl Grey Full Leaf Tea 120/cs)(1cs)(1188670)}
{(R)(Orange Blossom Full Leaf Tea 120/cs)(1cs)(11001510)}
{(R)(Passion Full Leaf Tea 120/cs)(1cs)(11001506)}
{(R)(Refresh Full Leaf Tea 120/cs)(1cs)(11001512)}
} doinv
nextpage
paintform
{
{(R)(TAZO VANILLA ROOIBOS FLFB)(1cs)(1188668)}
{(R)(Zen Full Leaf Tea 120/cs)(1cs)(11001508)}
{(S)(SYRUP 1L GINGERBREAD 6/cs)(1cs)(184517)}
{(S1)(Syrup Classic)(6ea)(184524)}
{(S2)(SYRUP 1L PEPPERMINT 6/cs)(1cs)(184520)}
{(S2)(Syrup Raspberry)(6ea)(184502)}
{(T1)(Syrup Toffee Nut)(6ea)(184521)}
{(T2)(Syrup Dark Cherry)(6ea)(11005472)}
{(U)(SMALL TRASH CAN LINER 23X32 CS/500)(1cs)(1117270)}
{(V)(Filters Coffee 14x6 (Bunn Brewer))(1cs)(100369)}
{(W7)(Mocha White Chocolate 4/cs)(4ea)(466215)}
{(X)(PLASTIC FORK BLACK PP CS/500)(1cs)(1241049)}
{(X)(PLASTIC KNIFE BERRY PP CS/500)(1cs)(1241050)}
{(X)(PLASTIC SPOON BLACK PP CS/500)(1cs)(1241051)}
{(X)(SAUCE 63OZ PUMPKIN SPICE 4/cs)(1cs)(183678)}
{(X)(SAUCE TOFFEE MOCHA 64OZ 4/cs)(1cs)(11007485)}
{(Y)(Breakfast 1# WB)(12ea)(160371)}
{(Y)(Decaf Espresso 1# WB)(12ea)(159573)}
{(Y)(Decaf House 1# WB)(12ea)(160380)}
{(Y)(Decaf Sumatra 1# WB)(6ea)(11005406)}
{(Y)(Decaf Verona 1# WB)(12ea)(159575)}
{(Y)(Espresso 1# WB)(12ea)(160385)}
{(Y)(FTN 1LB WB CAFE ESTIMA 6/cs)(1cs)(11005724)}
{(Y)(French 1# WB)(12ea)(160387)}
{(Y)(Gold Coast 1# WB)(12ea)(160388)}
{(Y)(Guatemala 1# WB)(12ea)(159576)}
{(Y)(House 1# WB)(12ea)(160389)}
{(Y)(Italian 1# WB)(12ea)(159577)}
{(Y)(Kenya 1# WB)(12ea)(160392)}
{(Y)(Komodo Dragon 1# WB)(12ea)(189561)}
{(Y)(OSM 1LB WB ORGANIC SHADE GROWN MEXICO 6/cs)(1cs)(11005722)}
{(Y)(Organic Yukon 1# WB)(12ea)(11002995)}
{(Y)(Pike Place Roast 1# WB)(12ea)(11001641)}
{(Y)(RED 1LB WB STARBUCKS (RED) BLEND 6/cs)(1cs)(11006074)}
{(Y)(Sumatra 1# WB)(12ea)(160402)}
{(Y)(TOPPING PUMPKIN SPICE)(1ea)(183929)}
{(Y)(Verona 1# WB)(12ea)(160403)}
{(1A)(Caramel Sauce 6/ea)(1cs)(135542)}
{(1A)(Protein and Fiber Powder)(10ea)(1096069)}
{(1A)(Vanilla Bean Powder)(12ea)(181892)}
{(1B)(DETERGENT CLICKWASH MULTIPURPOSE)(1cs)(11007888)}
{(1B)(GLASS AND SURFACE CLEANER)(1ea)(1206684)}
{(1B)(PAD POWER SCOTCH BRITE CS/20)(1cs)(1173904)}
{(1B)(SANITIZER 2x1GLN CLICKSAN CS/2)(1cs)(1196876)}
} doinv
nextpage
paintform
{
{(1B)(SANITIZER KAY-5)(1cs)(11007227)}
{(1B)(SPIRIT LIQUID CLEANSER CS/9)(1cs)(1196868)}
{(1B)(STRIP CHLORINE SANITIZER TEST)(1bag)(11007627)}
{(2)(Oatmeal Packets 96/cs)(96ea)(1181989)}
{(2)(Oatmeal Topping Brown Sugar)(125ea)(11003410)}
{(2)(Oatmeal Topping Mixed Dried Fruit)(125ea)(11003061)}
{(2)(Oatmeal Topping Nut Medley)(125ea)(11003408)}
{(3)(ANV 5LB WB ANNIVERSARY)(1ea)(7356)}
{(3)(DES 5# WB)(4ea)(7339)}
{(3)(DPPR (DED) 5#)(1ea)(190135)}
{(3)(ESP 5# WB)(4ea)(7360)}
{(3)(Gold Coast 5#)(1ea)(7381)}
{(3)(Italian Roast 5#)(1ea)(7366)}
{(3)(PPR (EDB) 5#)(4ea)(190124)}
{(3)(Sumatra 5#)(1ea)(7336)}
{(4)(TRAY 4CUP CARRY CS/150)(1cs)(1218491)}
{(6)(BATH TISSUE ENVISION EMBOSSED)(1cs)(1169048)}
{(6)(BOX US 96OZ COFFEE TRAV 25/CS)(25ea)(187268)}
{(6)(CUP 3.5OZ COLD Sample CS/2500)(1cs)(1237510)}
{(6)(CUP 4OZ HOT Sample 1000/CS)(1cs)(249195)}
{(6)(NAPKINS CS/6000)(1cs)(11003718)}
{(6)(Oatmeal Bowl 12oz 300/cs)(1cs)(1193157)}
{(6)(PAPER TOWELS MULTI FLD 4000/CS)(1cs)(191665)}
{(6)(STIR STICK WOOD 7" CS/10000)(1cs)(144164)}
{(6)(STRAW 10.25IN GREEN)(1cs)(11007880)}
{(6)(STRAW 7.75IN GREEN)(1cs)(11007879)}
{(6)(TOILET SEAT COVER 1/2 FOLD)(1cs)(191668)}
{(7)(CUP 12OZ PCF HOT CS/1000)(1cs)(195242)}
{(7)(CUP 16OZ PCF HOT CS/1000)(1cs)(195243)}
{(7)(CUP 20OZ PCF HOT CS/600)(1cs)(195244)}
{(7)(CUP 8OZ PCF HOT CS/600)(1cs)(195241)}
{(7)(LID 12OZ HOT TRAV CS/1000)(1cs)(11002062)}
{(7)(LID 16/20OZ HOT TRAV CS/1000 07)(1cs)(504183)}
{(7)(LID 8OZ HOT TRAV CS/1000)(1cs)(504197)}
{(8)(CUP 12OZ COLD)(1cs)(11007221)}
{(8)(CUP 16OZ COLD CS/1000)(1cs)(11007222)}
{(8)(CUP US 24OZ COLD CS/600)(1cs)(11007223)}
{(8)(LID 12/20OZ COLD DOME CS/1000)(1cs)(1237514)}
{(8)(LID 12/20OZ COLD FLAT CS/1000)(1cs)(1237515)}
{(9)(Doubleshot 6.5oz can)(12ea)(11000623)}
{(9)(Doubleshot Energy - Coffee Vanilla)(12ea)(1148492)}
{(9)(Doubleshot Lite)(12ea)(11006612)}
{(9)(Ethos Water (for non CDC stores only))(24ea)(192269)}
{(9)(Frappuccino Mocha 9.5oz)(12ea)(184247)}
} doinv
nextpage
paintform
{
{(9)(HOT SLEEVE 12/16/20 CUP CS/1200)(1cs)(11002137)}
{(9)(Honey Packets)(1cs)(1237366)}
{(9)(Izze Sparkling Blackberry)(12ea)(1214766)}
{(9)(Izze Sparkling Clementine)(12ea)(191856)}
{(9)(LID 16/24OZ COLD DOME CS/1000)(1cs)(1237504)}
{(9)(LID 16/24OZ COLD FLAT CS/1000)(1cs)(1237505)}
{(9)(Organic Apple Juice Boxes)(27ea)(11002039)}
{(9)(Organic Milk 8oz Chocolate)(18ea)(176205)}
{(9)(Organic Milk 8oz Vanilla)(18ea)(176193)}
{(9)(San Pellegrino Water 250mL)(24ea)(184885)}
{(9)(Sugar Equal)(1cs)(114831)}
{(9)(Sugar Splenda)(1cs)(186418)}
{(9)(Sugar Sweet n' Low)(1cs)(155125)}
{(9)(Sugar White Packets)(1cs)(104750)}
{(9)(Sugar in the Raw)(1cs)(186477)}
{(9)(Tazo Organic Iced Green)(12ea)(185704)}
{(9)(WATER METRO ELECTRO 12/cs)(1cs)(11004640)}
{(9)(Water Hint Blackberry)(12ea)(11004638)}
{(10)(Breakfast 1# WB)(12ea)(160371)}
{(10)(Decaf Espresso 1# WB)(12ea)(159573)}
{(10)(Decaf Espresso Pods)(4ea)(158888)}
{(10)(Decaf House 1# WB)(12ea)(160380)}
{(10)(Decaf Sumatra 1# WB)(6ea)(11005406)}
{(10)(Decaf Verona 1# WB)(12ea)(159575)}
{(10)(Espresso 1# WB)(12ea)(160385)}
{(10)(Espresso Pods)(4ea)(158887)}
{(10)(FTN 1LB WB CAFE ESTIMA 6/cs)(1cs)(11005724)}
{(10)(French 1# WB)(12ea)(160387)}
{(10)(Gold Coast 1# WB)(12ea)(160388)}
{(10)(Guatemala 1# WB)(12ea)(159576)}
{(10)(House 1# WB)(12ea)(160389)}
{(10)(Italian 1# WB)(12ea)(159577)}
{(10)(Kenya 1# WB)(12ea)(160392)}
{(10)(Komodo Dragon 1# WB)(12ea)(189561)}
{(10)(OSM 1LB WB ORGANIC SHADE GROWN MEXICO 6/cs)(1cs)(11005722)}
{(10)(Organic Yukon 1# WB)(12ea)(11002995)}
{(10)(Pike Place Roast 1# WB)(12ea)(11001641)}
{(10)(RED 1LB WB STARBUCKS (RED) BLEND 6/cs)(1cs)(11006074)}
{(10)(Sumatra 1# WB)(12ea)(160402)}
{(10)(TOPPING PUMPKIN SPICE)(1ea)(183929)}
{(10)(Verona 1# WB)(12ea)(160403)}
{(14)(ANV 1LB WB ANNIVERSARY 6/cs)(1cs)(11002186)}
{(14)(ANV 8OZ WB ANNIVERSARY 12/cs)(1cs)(165771)}
{(15)(BAR COCOA 3.25LB CONTAINER)(1ea)(148516)}
} doinv
nextpage
paintform
{
{(15)(Condiment Bar - Chocolate Powder)(1ea)(193890)}
{(15)(Condiment Bar - Cinnamon)(1ea)(166051)}
{(15)(Condiment Bar - Nutmeg)(1ea)(166050)}
{(15)(Condiment Bar - Vanilla Powder)(1ea)(504207)}
{(99)(4IN GREEN SAMPLE STRAW)(1cs)(11007878)}
{(99)(BAG PASTRY 1/cs)(1cs)(11003261)}
{(99)(BAG WARMING CS/500)(1cs)(1084662)}
{(99)(CADDY US CONDIMENT KIT CS/50)(1cs)(187692)}
{(99)(DETERGENT MULTIPURPOSE SINK)(1cs)(11007225)}
{(99)(DETERGENT WAREWASH)(1cs)(11007863)}
{(99)(OUTDOOR TRASH CAN LINER 40x46 CS/125)(1cs)(1157718)}
{(99)(PAPER PLAS.LIDS.STARBUCKS.32OZ.REGULAR.NON-SPECIFIC 1/cs)(1cs)
(11002905)}
{(99)(PARCHMENT PAPER 9.5 X 5 CS/1000)(1cs)(208311)}
{(99)(POLISH STAINLESS/WOOD)(1cs)(11007226)}
{(99)(PP ICB(Terraza Blend) 5oz)(32ea)(195705)}
{(99)(Pepper Packets 3000/cs)(1cs)(1068152)}
{(99)(SANITIZER ESTEEM SANI-NC)(1cs)(11007864)}
{(99)(Salt Packets 3000/cs)(1cs)(1068151)}
{(99)(Sugar 5lb bag)(1ea)(338968)}
} dup length 0 gt { doinv showpagenum showpage }if
%eof