Re: Postscript output mods [message #33420] |
Mon, 06 January 2003 12:50  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
S. Penzes (Steven.Penzes@drdc-rddc.gc.ca) writes:
> S. Penzes wrote:
>> Sorry for what must be an oft asked question. What is the best way to
>> rotate my landscape Postscript output 90 degrees? Do I modify the
>> "plot, oplot, etc commands? Is there a keyword to the PS device? Do I
>> have to do the rotation with a PS program (aside: will ghostview do the
>> job) before I insert it into my MS Word?
>> Thanks
>> Steve
>>
> Sorry people. I meant 180 degrees ... he says hoping to forestall all
> the comments about using Portrait.
The problem is that PostScript (apparently) doesn't have a standard
for what "landscape" is suppose to be. For example, if you open these
files up in Ghostview and orient them as "seascape", they appear
correctly. There is a "Swap Landscape" button in Ghostview do to this
automatically. Here is what the documentation says about it:
******************************
When the Swap Landscape option is checked, GSview swaps the meaning of
Landscape and Seascape. Most of the Landscape documents that I have
encountered require a 90 clockwise rotation of the paper to view.
However, there is no standard and some documents need to be rotated the
other way. The Swap Landscape button allows GSview to automatically
rotate the document the right way in response to the %%Orientation
comment in the PostScript file.
********************************
In any case, everything I've ever put PostScript files in has the
ability to "flip" the image quickly. It doesn't seem to be much of
a problem.
You could try putting your own orientation comments into the PostScript
file with the OUTPUT keyword to the DEVICE command. Let us know if you
get something like that to work.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
|
Re: Postscript output mods [message #33655 is a reply to message #33420] |
Sat, 11 January 2003 13:53  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
David Fanning wrote:
Dear S and David,
we have tried a lot of things to get idl output right rotated in landscape.
It's impossible at the moment, so we have done a feature request.
Some of us are working on a routine which will write the rotation postscript
command into the postscriptfile for each page.
It is not finished. Sometimes it works ...
One more feature of this routine is to set the right boundingbox for eps
files.
Reimar
> S. Penzes (Steven.Penzes@drdc-rddc.gc.ca) writes:
>
>> S. Penzes wrote:
>>> Sorry for what must be an oft asked question. What is the best way to
>>> rotate my landscape Postscript output 90 degrees? Do I modify the
>>> "plot, oplot, etc commands? Is there a keyword to the PS device? Do I
>>> have to do the rotation with a PS program (aside: will ghostview do the
>>> job) before I insert it into my MS Word?
>>> Thanks
>>> Steve
>>>
>> Sorry people. I meant 180 degrees ... he says hoping to forestall all
>> the comments about using Portrait.
>
> The problem is that PostScript (apparently) doesn't have a standard
> for what "landscape" is suppose to be. For example, if you open these
> files up in Ghostview and orient them as "seascape", they appear
> correctly. There is a "Swap Landscape" button in Ghostview do to this
> automatically. Here is what the documentation says about it:
>
> ******************************
> When the Swap Landscape option is checked, GSview swaps the meaning of
> Landscape and Seascape. Most of the Landscape documents that I have
> encountered require a 90 clockwise rotation of the paper to view.
> However, there is no standard and some documents need to be rotated the
> other way. The Swap Landscape button allows GSview to automatically
> rotate the document the right way in response to the %%Orientation
> comment in the PostScript file.
> ********************************
>
> In any case, everything I've ever put PostScript files in has the
> ability to "flip" the image quickly. It doesn't seem to be much of
> a problem.
>
> You could try putting your own orientation comments into the PostScript
> file with the OUTPUT keyword to the DEVICE command. Let us know if you
> get something like that to work.
>
> Cheers,
>
> David
--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
|
|
|
Re: Postscript output mods [message #33659 is a reply to message #33421] |
Fri, 10 January 2003 12:57  |
fardal
Messages: 3 Registered: January 1996
|
Junior Member |
|
|
"S. Penzes" <Steven.Penzes@drdc-rddc.gc.ca> wrote in message news:<1041884260.331402@coyote>...
> Sorry people. I meant 180 degrees ... he says hoping to forestall all
> the comments about using Portrait.
Don't know how to do this in IDL. It sure is annoying when all your
other programs think it should be oriented the other way. You didn't
say what your platform was... If you have the pstops command (common on
linux) you can say
pstops '0U(8.5in,11in)' infile.ps outfile.ps
There is probably a program on any platform to do something similar,
or you can write it yourself with the advice here:
http://www.physics.ohio-state.edu/~faqomatic/fom-serve/cache /140.html
I would use a hack like the one below to automate the rotation (type dclose
instead of device,/close to finish the file).
Mark Fardal
University of Victoria
;returns currently open ps file
;THIS IS DANGEROUS--RSI MAY CHANGE HELP FORMAT
function getpsfile
on_error, 2
if (!d.name ne 'PS') then message, 'Not in PS device.'
help,/device,output=helptxt
file = (strsplit( strcompress( strtrim( helptxt[2], 2 ) ), ' ' ,/extract))[1]
if (file eq '<none>') then file = 'idl.ps'
return, file
end
pro dclose
filename = getpsfile()
device,/close
spawn, 'pstops "0U(8.5in,11in)" '+filename+' idl_tmp.ps'
spawn, 'mv -f idl_tmp.ps ' + filename
return
end
|
|
|