Lisp HUG Maillist Archive

Printing a pane that's not displayed

I've got an interface that displays some calendar data using a grid-layout. I would like to print that information.

Using CAPI, printing apparently is done using an output-pane. I've got that part.

However, it seems that the output-pane has to appear in the interface's layout in order for it to print. But I don't want to display it; I just want to print it. Is there some non-fishy way to achieve that, or is there some trick I should know, like putting it in a non-viewable part of the interface?

Thanks, as always, for your help.

Laughing Water

Re: Printing a pane that's not displayed

So, give up?

I've found one solution that works:


(defun print-my-undisplayed-pane (interface &optional (scale 1))

  (let ((original-layout (capi:pane-layout interface)))
    (setf (capi:pane-layout interface) (make-instance 'capi:simple-layout
                                                      :description (list (my-undisplayed-pane interface))))

      ... [ a bunch of printer junk here ]...

    (setf (capi:pane-layout interface) original-layout)))


I'd still like to know if there's a more elegant solution.

Laughing Water


On Dec 17, 2009, at 4:52 PM, Laughing Water wrote:

> 
> I've got an interface that displays some calendar data using a grid-layout. I would like to print that information.
> 
> Using CAPI, printing apparently is done using an output-pane. I've got that part.
> 
> However, it seems that the output-pane has to appear in the interface's layout in order for it to print. But I don't want to display it; I just want to print it. Is there some non-fishy way to achieve that, or is there some trick I should know, like putting it in a non-viewable part of the interface?
> 
> Thanks, as always, for your help.
> 
> Laughing Water


Updated at: 2020-12-10 08:40 UTC