Re: Postscript for different paper sizes [message #5686 is a reply to message #5618] |
Wed, 24 January 1996 00:00   |
hahn
Messages: 108 Registered: November 1993
|
Senior Member |
|
|
pit@asterix.kis.uni-freiburg.de (Peter Suetterlin) wrote:
> In article <4do2gb$s94@cpca3.uea.ac.uk>,
> f055@uea.ac.uk (T.Osborn) writes:
>>
>> When outputting plots to the PS device, does the PS file contain any
>> settings for the paper size?
There is no way to set a paper size in PostScript. You can request a
specific paper size and you can query the size of the print area when
the printer is directly attached to the computer. The application
program (IDL in this case) is responsible for generating the
necessary instructions to fit the plot onto the page. A PostScript
printer is not allowed to scale or rotate the page on its own to
make it fit! This is left to the device driver.
>> If so, what is the default? Letter?
Here is what is contained in IDL Help:
Feature Value
File idl.ps
Mode Portrait, non-encapsulated, no color
Horizontal offset 3/4 in.
Vertical offset 5 in.
Width 7 in.
Height 5 in.
Scale factor 1.0
Font size 12 points
Font Helvetica
# Bits / Image Pixel 4
Table 3.12 Default PostScript Driver Settings
>> If so, how can I change it to A4 or A3 etc.?
> I'm not shure whether special procedures for this exist, but you can
> always set the dimensions you like using the device procedure:
> set_plot,'ps'
> device, xsize=28,ysize=41,xoffset=0.8,yoffset=0.5
> would give you about an A3 Plotting range.
Hmmm well, it may work, but...
Older versions of IDL contained a procedure called
phaser.pro to correctly setup for a Tektronix Phaser
printer. Acutally you have a lot of parameters to
define, esp. when you want to generate both portrait
and landscape output.
I adapted the old Phaser.pro for our Tek Phaser IIIpxi
which can handle both A3 and A4 and the similar US
formats. The essence of my phaser3.pro is:
; $Id: phaser.pro,v 1.2 1993/04/02 19:43:31 Ha THD $
pro phaser3, medium=medium, landscape=landscape, portrait=portrait, $
filename=filename
[comments deleted to save bandwidth]
; MODIFICATION HISTORY:
; Created 22-OCT-1991 by Mark Rivers.
; Adapted 22-Nov-1993 by Norbert Hahn, THD.
; Update 14OCTv-1994 by Norbert Hahn, THD: /isolatin1 added
;-
short_side = 28.55
small_offset=(29.7-short_side)/2.0
long_side = 40.75
big_offset=(42.0-long_side)/2.0
if n_elements(medium) ne 0 then begin
c_size = STRUPCASE(STRCOMPRESS(medium,/REMOVE_ALL))
endif else begin
c_size = 'A3P'
endelse
if n_elements(filename) ne 0 then begin
fn = filename
endif else begin
fn = 'idl.ps'
endelse
set_plot, 'ps'
if c_size eq 'A4P' then begin
short_side = 19.76
small_offset=(21.0-short_side)/2.0
long_side = 28.58
big_offset=(29.7-long_side)/2.0
endif
if c_size eq 'A4F' then begin
short_side = 20.0
small_offset=(21.0-short_side)/2.0
long_side = 27.0
big_offset=(29.7-long_side)/2.0
endif
if n_elements(portrait) ne 0 then begin
device, bits=8, /color, xsize=short_side, ysize=long_side, $
xoffset=small_offset, yoffset=big_offset, $
/portrait, /isolatin1, filename=fn
endif else begin
device, bits=8, /color, xsize=long_side, ysize=short_side, $
xoffset=small_offset, yoffset=long_side+big_offset, $
/landscape, /isolatin1, filename=fn
endelse
end
> Peter
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
> Peter "Pit" Suetterlin http://www.kis.uni-freiburg.de/~ps
> Kiepenheuer Institut fuer Sonnenphysik
> Tel.: +49 761 3198-210 ps@kis.uni-freiburg.de
> -- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * --
> Come and see the stars! http://www.kis.uni-freiburg.de/~ps/SFB
> Sternfreunde Breisgau e.V.
> Tel.: +49 761 73571 or 278588
> ____________________________________________________________ ______________
Norbert Hahn
University of Darmstadt
Germany
|
|
|