🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.postscript.programming
Article #263

Label Strings in PJL in PostScript

#263
From: Ken_Grafals
Date: Mon, 25 Sep 2006 18:44
105 lines
3356 bytes
I've been trying to edit a postscript file to print "Released: <date>" (where <date> is today's date) on the corner of a page. I'm trying to use PJL and a LABELSTRING object to do it but when I send the PS file to the printer it prints out the code in what I'm sure is ASCII.

My PS code with PJL looks like this:

Ec%-12345X@PJL
@PJL JOB NAME="PostScript_04-28-06"
@PJL SET LABELSTRING="Released On: 04-28-06"
@PJL SET LABELLOCX = LEFT
@PJL SET LABELLOCY = BOTTOM
@PJL SET LABELSHADING = 75
@PJL SET LABELSIZE = 14
@PJL SET LABELROTATE = 0
@PJL SET LABELFONTOBJ = "HP2 Stick Font - Proportional"
@PJL ENTER LANGUAGE=AUTO
%!PS-Adobe-2.0
%%Creator: System Development PostScript Output Library
%%Copyright: System Development, Inc., All rights reserved
%%BoundingBox: 62 12 549 779
%%EndComments
%%BeginProlog
%%BeginProcSet: SDI_PS_Functions
/d{def}bind def/b{bind}bind d/bd{b d}b d/x{exch}bd/dp{dup}bd/al{aload}bd
/t{true}bd/f{false}bd/xd{x d}bd/r{roll}bd/c{copy}bd/i{index}bd/sb{sub}bd
/ad{add}bd/dv{div}bd/ng{neg}bd/p{pop}bd/rp{repeat}bd/lp{loop}bd/n{newpath}bd
/m{moveto}bd/l{lineto}bd/rl{rlineto}bd/cv{curveto}bd/a{arc}bd/an{arcn}bd

... postscript code ...

d /OV CV d } rp}bd/sstc{ /Sc //Svc d /Src //Srvc d nt cvr /OV xd 3{nt p}rp
 1 sb sst_ p p p}bd/sst{ /Sc //Scc d /Src //Srcc d nt cvr /OV xd 1 sb sst_
 p p p p p}bd/ssb{ /IX 0 d 3{nt p}rp 1 sb { nt nt nt sc IX bMn m 1 0 rl
 IX 1 ad bMx l -1 0 rl cp fl /IX IX 1 ad d }rp}bd
/Fc{gs 2 c tr Pm cc Pc Pr 8[Pc 0 0 Pr neg 0 Pr]{P} f 3 cli gr}bd
%%EndProcSet
%%EndProlog
%%BeginSetup
%%BeginFeature: *PageSize Letter
     << /PageSize [612 792] /MediaType null /InputAttributes << 0 << /PageSize [612 792] /MediaType null >> >> >>
     setpagedevice
%%EndFeature

n f ci 1 LT 1 et 1 lw 0 LC 0 LJ 1 ml 0 eLC 0 eLJ 1 eml 1 ew 0 0 0 lc 0 0
 0 ec 0 0 0 fc 0 0 0 tc 1 is f ev -1 1 wM 0 1 pM 0 -1 nM -1 1 bM f rct
0.18 0.18 scl
0.18 /fact x d
%%EndSetup
gs
0 0 0 lc
0 0 0 ec
0 0 0 fc
f ev
0 is
1 hi
/P1 <000000 >d
/Pc 1 d
/Pr 1 d
/P P1 d
1 LT
1 et
1 ew
1 lw
1 LT
1 lw
0 0 0 lc
0 0 0 tc
0 is
0 0 0 fc
1 hi
1 ew
1 et
0 0 0 ec
f ev
346.787 69.66 3053.214 4330.34 cr nc
t ci nc
2 LC
1 LT
2.456 lw
1 0 0 lc
0 LC
2257.973 2344.199 2227.276 2344.199 1 M
S
2917.945 2344.199 2856.552 2344.199 1 M
S
1567.303 2344.199 1628.696 2344.199 1 M
S
2534.24 2344.199 2273.321 2344.199 1 M
S

... more postscript ...

450.964 84.434 442.558 84.434 16 M
S
458.033 88.637 458.723 87.946 458.033 87.241 457.327 87.946 458.033 88.637
4 M
S
458.033 80.246 458.723 79.541 458.033 78.85 457.327 79.541 458.033 80.246
4 M
S
gr sp
%%EOF
@PJL EOJ
Ec%-12345X

Thanks,
Ken
Technical Details
Message-ID: <3bc1c58a.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: 10c61a,1abfe615804c3f27,start
X-Google-Attributes: gid10c61a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Ken_Grafals@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.albasani.net!news.isoc.lu!webcrossing
Newsgroups: adobe.postscript.programming
Subject: Label Strings in PJL in PostScript
Message-ID: <3bc1c58a.-1@webcrossing.la2eafNXanI>
Date: Mon, 25 Sep 2006 11:44:05 -0700
Lines: 120
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit