Article View: adobe.postscript.programming
Article #321Re: Understanding Post Script
From: Nagendra_Kuma
Date: Tue, 22 Jul 2008 18:24
Date: Tue, 22 Jul 2008 18:24
41 lines
2633 bytes
2633 bytes
Hi Aandi,
Thanks for your reply . But we have tried removing this Post script and the result was not as expected. so understood that they are not comments. we used post scripts in our report generation to get certain outputs .we are trying to get rid of this post scripts and also at the same time maintain for the current production use.so in our maintaining activity we have follwoing problem .
we have a form with post script embedded to it,which i gave below.what our understanding is ,this post script creates a box.then we send the text from input file,which will be displayed inside the box.we think that the box is taking relative position to the top left corner of the page.right now we are trying to place a static text at top corner of the page.but by doing that.if my input file not passing the text for the box.my new static text is disappearing .
So, we are trying to understand this post script, so that we can locate what is the starting position that is tied up with this box display. We might need to change the position so that our new static text at the top of the form should be stick to one place.
The post script is -
%PS mark 0.5 setlinewidth currentpoint
%PS 22 1 50 {dup 0 0 t! (B) eq {20 99 t! show crlf}{exit}ifelse }for
%PS dup 22 ne{3 1 roll gsave
%PS currentpoint -6 8 translate 4 -2 roll moveto currentpoint exch pop 546 exch lineto
%PS dup 546 exch lineto lineto closepath stroke grestore
%PS 22 sub 12 mul}{pop pop pop 0}ifelse
%PS currentpoint
%PS 26 1 49 {dup 0 0 t! (D) eq {20 99 t! show crlf}{exit}ifelse }for
%PS dup 26 ne{3 1 roll gsave
%PS currentpoint -6 8 translate 4 -2 roll moveto currentpoint exch pop 546 exch lineto
%PS dup 546 exch lineto lineto closepath stroke grestore
%PS 26 sub 12 mul}{pop pop pop 0}ifelse
%PS add neg 0 exch translate
%PS cleartomark
if you can help us explain what this post script does and explain where we can modify to achieve our requirement,that would be great.
Technical Details
Message-ID:
<59b5e758.3@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!news4us.nl!webcrossingReferences:
<59b5e758.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: 10c61a,9dc919566bb30bed X-Google-Attributes: gid10c61a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Nagendra_Kuma@adobeforums.com Newsgroups: adobe.postscript.programming Subject: Re: Understanding Post Script Message-ID: <59b5e758.3@webcrossing.la2eafNXanI> Date: Tue, 22 Jul 2008 11:24:36 -0700 References: <59b5e758.-1@webcrossing.la2eafNXanI> Lines: 57 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!feeder.news-service.com!tudelft.nl!txtfeed1.tudelft.nl!news4us.nl!webcrossing