Re: true landscape orientation

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 12 Jan 2009 07:37:40 -0700

On Jan 11, 2009, at 4:02 PM, Fred Clare wrote:

> Rob,
>
> Thanks for your input. In looking at my Postscript Reference
> Manual your observation about inserting a Postscript comment:
>
> %%Orientation: Landscape
>
> in the initial comments section of a Postscript file should
> indeed afford interpreters the ability to position the plots
> as you desire. However, neither of the Postscript viewers I am using
> on my Mac ("gs" and "preview") seems to respond to having this comment
> in a file. Let me know what you get with the trivial Postscript
> file attached. Given your experience with GV it would appear
> that Postscript interpreters are not rock solid in their honoring
> the orientation comment. :-) How would you expect a Postscript
> printer to react to the landscape orientation comment?
>
> I could easily insert an orientation comment in the lower level
> Postscript driver when a Postscript landscape workstation
> is opened. I think things get a little tricky when considering
> Postscript created from NCL. For example, when the gsnMaximize
> resource is set to True, then the resource gsnPaperOrientation can
> be applied on a frame-by-frame basis. To have orientation
> comments in the output Postscript properly reflect this whould
> require inserting %%PageOrientation comments at the Postscript
> page level. Effecting this at the NCL level would require
> implementing a function call for the Postscript driver to
> respond to, and NCL would have to make that call where appropriate.
> Assuming that we can settle for a global orientation comment,
> there are still considerations for NCL. Since the resource
> gsnMaximize can be set on a frame-by-frame basis, and that
> may or may not result in an individual frame being produced
> in either landscape or portrait mode, we are back in the same
> situation as with the above considerations for gsnPaperOrientation.
>
> I see nothing in my PDF Reference Manual the would be the
> equivalent to the Postscript orientation comment. But my
> manual is eight years old, so maybe there has been an addition.
>
> Before proceding, I will wait for Mary to weigh in, since
> she knows the details of how NCL interfaces with the the lower
> level codes in this area.

Fred,

I believe the only thing that gsnMaximize does is set the
wkOrientation resource to either "landscape" or "portrait", and it
also causes the LLX, LLY, URX, and URY parameters to be calculated as
appropriate for the orientation. As you pointed out, this has to be
done before any drawing to the frame takes place, and it can happen on
frame-by-frame basis.

--Mary

>
>
> Regards,
>
> Fred Clare
>
> <test.ps>
>
>
>
>
> On Jan 9, 2009, at 6:32 PM, Rob Nicholas wrote:
>
>> Adding "%%Orientation: Landscape" to the header of the PostScript
>> file
>> seems to get you part way there -- GV displays the page in landscape
>> mode but upside down.
>>
>>
>> On Fri, Jan 9, 2009 at 12:14 PM, Fred Clare <fredclare_at_mac.com>
>> wrote:
>>>
>>> On Jan 9, 2009, at 12:36 PM, Rob Nicholas wrote:
>>>
>>>> Mary,
>>>>
>>>> On Fri, Jan 9, 2009 at 8:18 AM, Mary Haley <haley_at_ucar.edu> wrote:
>>>>>
>>>>> Maybe there's a flag that one can put in a PS/PDF file that tells
>>>>> other PS/PDF viewing applications that the image has been
>>>>> rotated, and
>>>>> hence it should automatically show it in landscape mode. I'll
>>>>> ask our
>>>>> PS/PDF expert about this.
>>>>
>>>> I'm almost certain this is true -- most other applications I've
>>>> used
>>>> that produce PostScript output seem to get this right. Unless
>>>> it's PDF
>>>> (rather than PostScript) I'm thinking of (although the problem
>>>> exists
>>>> with NCL's PDF output, too).
>>>
>>> I know of no Postscript or PDF operator that would specifically
>>> indicate to a viewing application to view the image as being
>>> rotated.
>>> Each language has a rotate operator, but that simply rotates the
>>> image within the context of the internal coordinate systems.
>>> Perhaps you could supply us with an example file that seems to
>>> have this property and I could look in there to see what is being
>>> used.
>>>
>>> Fred Clare
>>>
>>>>
>>>>
>>>> On Fri, Jan 9, 2009 at 8:18 AM, Mary Haley <haley_at_ucar.edu> wrote:
>>>>>
>>>>> For now, can you use the "Rotate" button on your viewer to rotate
>>>>> the image as desired?
>>>>
>>>> Sure, though it gets to be a bit of a chore when you're producing
>>>> 20
>>>> or 50 plots at a time. Let me know if you unearth a solution.
>>>>
>>>> Thanks,
>>>> Rob
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 12 2009 - 07:37:40 MST

This archive was generated by hypermail 2.2.0 : Mon Jan 12 2009 - 16:21:33 MST