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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, here is a simple postscript

Status
Not open for further replies.

cypressm

Programmer
Jul 24, 2003
18
FR
Hi,

here is a simple postscript file :

%!
%% ENTETE
@PJL SET RESOLUTION = 600
/PN { /Courier findfont fs scalefont setfont } def
/PI { /Courier-Oblique findfont fs scalefont setfont } def
/PG { /Courier-Bold findfont fs scalefont setfont } def
/S {show} def
/F {showpage} def
/N {
/y0 y0 fs sub store
x0 y0 moveto
} bind def
/x0 10 def
/y0 772 def
/fs 12 def
PN
x0 y0 moveto

%% DONNEES

(Le 12 Janvier 2003) S PG ( FACTURE 2020207) S N N
PI ( MR Lebrun Michel) S N

save
(X:/newsys/pscou/femme.eps) run
restore

F


I want to define the resolution of the image named "femme.eps" to modify the quality when I will send this file to the printer.

How can I do ?

Thanks !
 
You can't. An EPS is a type of PostScript program that obeys certain rules, so that the image it defines/paints/contains can be placed within a document or PostScript program.

The EPS can define it's image data anyway it wants. It can be an embedded bitmap, TIFF, or JPEG. It can use PostScript drawing operators for true vector art.

So, if your EPS contains bitmapped and/or rasterized image data, nothing you can do can change that. You have what you are given and that's that.

If your EPS contains vector drawing instructions, those are resolution-independent. The image will be rasterized by the output device when it is actually put on the page.

What you can do is size the image to any scale you like. You use the PostScript language "scale" operator, which takes two values, an X-scale and a Y-scale, each number must be a decimal. "1" equals 100%. You can scale non-uniformly if you like.

You'll need more than just a "save/restore" pair to truly encapsulate your EPS.

Here's an example:

Code:
save
  /showpage {} def
  /setpagedevice /pop load def
  0 0 translate
  1 1 scale
  (X:/newsys/pscou/femme.eps) run
restore

You would use the translate command to position your EPS, and the scale to size the EPS.

Hope this helps!

Thomas D. Greer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top