Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to insert a ps picture in a postscript document 1

Status
Not open for further replies.

shot01

Technical User
Apr 5, 2005
5
0
0
FR
Hi,

I would like to know how to insert a posrscript picture in a postscript document, or to add a font.
I really don't know how to do this.
Could sombedy help me ?

Thank you.
 
Well, those are two separate questions, and both of them are too vague to give specific answers.

What is a "PostScript picture"? Do you mean raw bitmap data, an EPS file, a TIFF, JPEG?

In regard to fonts... do you want to embed the font directly in your PostScript program? What type of font?



Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting
 
I'have a postscript document where there is only text.
Then, I would like to put a logo before the text.
The logo is a jpeg picture, but I can convert it in a ps picture.

Thank you for your answer.

Shot.
 
That still isn't enough detail. What is a "PostScript document"? PostScript is a programming language, so I assume you have a PostScript program that produces a page of text. Right?

What is a "PostScript picture"?

You can image a JPEG file using the /DCTDecode filter and the "image" operator.



Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting
 
I have a document : text.ps, where there is only text.
This text document is on 3 pages.
On the top of each page, there is a place to put a logo.
This logo the file : logo.eps

I've seen your website and i have made different tests.

In a simple example, I know how to do this. I made it.
But the code of my document "text.ps" is very complicated and I don't know how to use the part :

save
/showpage {} def
/setpagedevice /pop load def
(e:/logo.eps) run
restore

 
Ok, I understand now.

Put something like this at the very top of your main document. It can go right undernead the opening "%!PS" statement:

Code:
%!PS

/ImageData
currentfile
<< /Filter
   /SubFileDecode
   /DecodeParms
   << /EODCount 0 /EODString (*EOD*) >>
>> /ReusableStreamDecode filter
%%TGREER: put your EPS between this comment...
%%TGREER: and this comment!
*EOD*
def

/LogoForm
<< /FormType 1
   /BBox [0 0 612 792]
   /Matrix [ 1 0 0 1 0 0]
   /PaintProc
   { pop
       /ostate save def
         /showpage {} def
         /setpagedevice /pop load def
         0 0 translate % change to the position you need
         1 1 scale     % remove or alter to change size
         ImageData 0 setfileposition ImageData cvx exec
       ostate restore
   } bind
>> def

<<
   /BeginPage
   { gsave
       LogoForm execform
     grestore
   } bind

>> setpagedevice

Thomas D. Greer

Providing PostScript & PDF
Training, Development & Consulting
 
Thank you very much for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top