Reputation: 11
We are a large retail business that uses Postscript for all price tags. I have designed this 36-up page of labels both as landscape and portrait (horizontal and vertical), with completely unique code. But as soon as I get to 27 barcodes, the entire page will not print. So I randomly remove 9 of them (it doesn't matter where from) and the page prints. The problem is that we need 36 barcodes. The sample picture contains a portion of the 8 1/2 x 11" page. The top of each label is a short description, followed by the price, a SKU with a barcode at the bottom.
The following is the Postscript code that can be run on any Postscript printer. Notice at line 841, the first block of barcoding code is commented out with %%. Uncommenting them causes the page not to print:
%!
%%IncludeFeature: emulation(postscript)
%%IncludeFeature: input(lower)
%%IncludeFeature: output(face-up)
%%EndComments
/font {findfont exch scalefont setfont} bind def
%%========== Column 1.1 ==========
initgraphics
90 rotate
40 -55 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Black Go Type Cover) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(99) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111263638) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í111263638º¿) show
grestore
%%========== Column 1.2 ==========
initgraphics
90 rotate
159.75 -55 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Nba 2K20) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(29) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111712858) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í111712858,¿) show
grestore
%%========== Column 1.3 ==========
initgraphics
90 rotate
279.5 -55 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Xbox Live 12 Month \(2015\)) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(59) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(110063333) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í1100633333¿) show
grestore
%%========== Column 1.4 ==========
initgraphics
90 rotate
399.25 -55 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Xbox Live 3 Month \(2015\)) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(24) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(110063340) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í110063340«¿) show
grestore
%%========== Column 1.5 ==========
initgraphics
90 rotate
519 -55 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Crackdown 3) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(19) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111444012) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í111444012{¿) show
grestore
%%========== Column 1.6 ==========
initgraphics
90 rotate
638.75 -55 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(32GB Pink iPod Touch 6Th Gen) show
grestore
14 /Helvetica-Bold font
20 -20 moveto
($) show
62 -20 moveto
(99) show
31 -35 moveto
1.25 2.25 scale
(249) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(4828630) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í4828630G¿) show
grestore
%%========== Column 2.1 ==========
initgraphics
90 rotate
40 -142 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Shell Oil $25) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(00) show
36 -35 moveto
1.25 2.25 scale
(25) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(110063058) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í110063058[¿) show
grestore
%%========== Column 2.2 ==========
initgraphics
90 rotate
159.75 -142 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(Switch Lite Blue Armor Case) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(19) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111742897) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í111742897R¿) show
grestore
%%========== Column 2.3 ==========
initgraphics
90 rotate
279.5 -142 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(3Doodler Create+ Nozzle Set) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(19) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(112164307) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í112164307O¿) show
grestore
%%========== Column 2.4 ==========
initgraphics
90 rotate
399.25 -142 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Kingdom Hearts:All In One) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(39) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111923573) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í111923573t¿) show
grestore
%%========== Column 2.5 ==========
initgraphics
90 rotate
519 -142 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Tab S6 Lite Cover Blue) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(69) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(112013872) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í112013872Z¿) show
grestore
%%========== Column 2.6 ==========
initgraphics
90 rotate
638.75 -142 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Tab S6 Cover Rose Blush) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(69) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(112013775) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í112013775n¿) show
grestore
%%========== Column 3.1 ==========
initgraphics
90 rotate
40 -229 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Deskjet 3639 All In One) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(39) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111773318) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í111773318t¿) show
grestore
%%========== Column 3.2 ==========
initgraphics
90 rotate
159.75 -229 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( 10" Trolley Speaker) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(69) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111533546) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í111533546l¿) show
grestore
%%========== Column 3.3 ==========
initgraphics
90 rotate
279.5 -229 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(A4,4GB,32GB,14",Home 10S,Pink) show
grestore
14 /Helvetica-Bold font
20 -20 moveto
($) show
62 -20 moveto
(99) show
31 -35 moveto
1.25 2.25 scale
(199) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111982707) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í111982707δ¿) show
grestore
%%========== Column 3.4 ==========
initgraphics
90 rotate
399.25 -229 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(Kasa Spot Smart Cam Indoor) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(39) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111712904) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í111712904N¿) show
grestore
%%========== Column 3.5 ==========
initgraphics
90 rotate
519 -229 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Tab S6 Lite S-Pen Rose) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(49) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(112013937) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í112013937n¿) show
grestore
%%========== Column 3.6 ==========
initgraphics
90 rotate
638.75 -229 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( 3Doodler Start Pen Set) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(49) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(112164102) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í112164102{¿) show
grestore
%%========== Column 4.1 ==========
initgraphics
90 rotate
40 -316 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Ally Tw Gunmetal) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(99) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(112103456) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í112103456Q¿) show
grestore
%%========== Column 4.2 ==========
initgraphics
90 rotate
159.75 -316 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(Funko Pop:Frozen 2 Kristoff) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(10) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111773407) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í111773407j¿) show
grestore
%%========== Column 4.3 ==========
initgraphics
90 rotate
279.5 -316 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(Symantec Ns Deluxe 5 Device) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(79) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(110063449) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í110063449x¿) show
grestore
%%========== Column 4.4 ==========
initgraphics
90 rotate
399.25 -316 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Pro Controller) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(69) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(110602293) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í110602293P¿) show
grestore
%%========== Column 4.5 ==========
initgraphics
90 rotate
519 -316 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(A4,4GB,32GB,14",Home 10S,Pink) show
grestore
14 /Helvetica-Bold font
20 -20 moveto
($) show
62 -20 moveto
(99) show
31 -35 moveto
1.25 2.25 scale
(199) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111982707) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í111982707δ¿) show
grestore
%%========== Column 4.6 ==========
initgraphics
90 rotate
638.75 -316 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Xbox Live 3 Month \(2015\)) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(24) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(110063340) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í110063340«¿) show
grestore
%%========== Column 5.1 ==========
initgraphics
90 rotate
40 -403 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Microsoft Windows Gc $25) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(00) show
36 -35 moveto
1.25 2.25 scale
(25) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(110063422) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í110063422\)¿) show
grestore
%%========== Column 5.2 ==========
initgraphics
90 rotate
159.75 -403 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Switch Lite Crystal Case) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(13) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111742668) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í1117426685¿) show
grestore
%%========== Column 5.3 ==========
initgraphics
90 rotate
279.5 -403 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(Yo-Kai Watch 2:Psychic Specter) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(39) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(110782135) show
/Code128-Regular findfont 46 scalefont setfont
5 -55 moveto
gsave
.6 .2 scale
(í110782135W¿) show
grestore
%%========== Column 5.4 ==========
initgraphics
90 rotate
399.25 -403 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( 7-8" Neoprene Tab Case) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(19) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(4708120) show
%%/Code128-Regular findfont 46 scalefont setfont
%%5 -55 moveto
%%gsave
%%.6 .2 scale
%%(í110782135W¿) show
grestore
%%========== Column 5.5 ==========
initgraphics
90 rotate
519 -403 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(Wallmount-Wht-Beam \(Bm1Wmww1\)) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(00) show
36 -35 moveto
1.25 2.25 scale
(59) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111202892) show
%%/Code128-Regular findfont 46 scalefont setfont
%%5 -55 moveto
%%gsave
%%.6 .2 scale
%%(í110782135W¿) show
grestore
%%========== Column 5.6 ==========
initgraphics
90 rotate
638.75 -403 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Joy-Con Wheel 2 Pack) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(14) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111382343) show
%%/Code128-Regular findfont 46 scalefont setfont
%%5 -55 moveto
%%gsave
%%.6 .2 scale
%%(í110782135W¿) show
grestore
%%========== Column 6.1 ==========
initgraphics
90 rotate
40 -490 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(Endgame:Captain America-Funko) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(10) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111742640) show
%%/Code128-Regular findfont 46 scalefont setfont
%%5 -55 moveto
%%gsave
%%.6 .2 scale
%%(í110782135W¿) show
grestore
%%========== Column 6.2 ==========
initgraphics
90 rotate
159.75 -490 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(Switch Lite Blue Armor Case) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(19) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111742897) show
%%/Code128-Regular findfont 46 scalefont setfont
%%5 -55 moveto
%%gsave
%%.6 .2 scale
%%(í110782135W¿) show
grestore
%%========== Column 6.3 ==========
initgraphics
90 rotate
279.5 -490 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Cvs Pharmacy $25) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(00) show
36 -35 moveto
1.25 2.25 scale
(25) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(3899284) show
%%/Code128-Regular findfont 46 scalefont setfont
%%5 -55 moveto
%%gsave
%%.6 .2 scale
%%(í110782135W¿) show
grestore
%%========== Column 6.4 ==========
initgraphics
90 rotate
399.25 -490 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
(Funko Pop:Michael Jordan Bulls) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(34) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(111773430) show
%%/Code128-Regular findfont 46 scalefont setfont
%%5 -55 moveto
%%gsave
%%.6 .2 scale
%%(í110782135W¿) show
grestore
%%========== Column 6.5 ==========
initgraphics
90 rotate
519 -490 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Indoor HDTV Antenna) show
grestore
14 /Helvetica-Bold font
25 -20 moveto
($) show
60 -20 moveto
(99) show
36 -35 moveto
1.25 2.25 scale
(24) show
1 1 scale
gsave
8 /Helvetica font
15 -23 moveto
1.25 .5 scale
(110303539) show
%%/Code128-Regular findfont 46 scalefont setfont
%%5 -55 moveto
%%gsave
%%.6 .2 scale
%%(í110782135W¿) show
grestore
%%========== Column 6.6 ==========
initgraphics
90 rotate
638.75 -490 translate
13 /Helvetica font
0 0 moveto
gsave
.5 1 scale
( Google Nest Cam Outdoor) show
grestore
14 /Helvetica-Bold font
20 -20 moveto
($) show
62 -20 moveto (00) show 31 -35 moveto 1.25 2.25 scale (199) show 1 1 scale gsave 8 /Helvetica font 15 -23 moveto 1.25 .5 scale (110362675) show %%/Code128-Regular findfont 46 scalefont setfont %%5 -55 moveto %%gsave %%.6 .2 scale %%(í110782135W¿) show grestore showpage
Upvotes: 1
Views: 151
Reputation: 11
I haven't looked deeper, but the memory consumption sounds strange. It might be possible to write a better error reporter, but one thing I found right away is that I can count 107 gsave, but only 71 grestore. Are they all properly paired?
Upvotes: 1
Reputation: 19504
It sounds like a memory issue. You might try adding save ... restore
either around each code or around groups of them (like columns maybe).
Also note that calling initgraphics
shouldn't be necessary. It is called implicitly at the start of each page. Since you're just doing translate
and scale
, you can reset by using gsave ... grestore
or matrix defaultmatrix setmatrix
(although, considering the possible memory issue it would be better to grab the default matrix at the start /default matrix defaultmatrix def
and use that to reset default setmatrix
).
Also, your font setting code could be simplified to use selectfont
, assuming a Level 2 (or higher) PostScript printer. If it's a Level 1 printer, then that doubly implicates a memory issue since garbage collection wasn't added until Level 2.
Upvotes: 1