comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Adding more to a Window.Save PDF page
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Adding more to a Window.Save PDF page [message #94525] Thu, 22 June 2017 17:26 Go to previous message
Dick Jackson is currently offline  Dick Jackson
Messages: 347
Registered: August 1998
Senior Member
Hi all,

Here's a simplified explanation of what I'm doing with my widget application and Function Graphics, and what I'm having trouble with. I make a draw widget and use the Plot() function to make a plot, which the user can interact with:

wDraw = Widget_Window(...)

; after /Realizing widgets

Widget_Control, wDraw, GET_VALUE=oWindow

oWindow.Select

oPlot = Plot(...)
oLegend = Legend(…)

And I also have a Widget_Table with other details.

Once the user is happy with what is shown in the plot and the table, I'd like to provide a Print feature to make a PDF that shows both of those on one page.

I know the table won't come automatically (I'll have to lay that out with TEXT() objects, which is fine), but is there a way I can use oPlot and oLegend (or simply, oWindow) as *part* of what I want on a PDF page and add other things to that page? I know that oWindow.Save, 'myfile.pdf' creates a lovely PDF page of the current state of the window (which contains the plot), but I want to add other things to the page.

If I could make a new oPDFWindow object and add oPlot and oLabel to it, then add my table text objects, I could then do oPDFWindow.Save and I'm set.

oWindow is a GraphicsWin object, which Help, /OBJECTS tells me has:

Known Procedure Methods:
IDLITWINDOW::ADD

… so I tried:

oPDFWindow = GraphicsWin()
oPDFWindow.Add, oPlot

and I got:

% IDLGRMODEL::ADD: Invalid object reference: <ObjHeapVar434720>.

… as that Add method seems to be looking for regular "object graphics" objects.

The Plot() function calls the procedure "Graphic" which goes down a pretty deep rabbit hole… Has anyone else been down there?

Yes, I could make a routine to create the plots/legend, and call it once when I send it to screen and again when I send it to PDF, but I'd like to print to PDF the current state of the plots/legend, which the user may have customized on-screen.

Other ideas? Thanks for reading.

Cheers,
-Dick

Dick Jackson Software Consulting Inc.
Victoria, BC, Canada --- http://www.d-jackson.com
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Parallel Processing in IDL
Next Topic: H5G_open idl command

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:42:56 PDT 2025

Total time taken to generate the page: 0.00419 seconds