Lisp HUG Maillist Archive

Page format

Hi folks

Does anyone have experience of using different page formats for different documents in the same application?

Using (capi:page-setup-dialog) lets the user choose a page format, which I can then query with capi:get-printer-metrics. This seems to update the global printer (current-printer) and works fine as long as the formatting takes place in the printing process.

But in my case, I want a more WYSIWYG approach, where line breaking etc on screen reflects what is going to be printed. So each document needs to store its own dimensions. But then I would need to roll my own page setup dialog! Is it even possible to set the printer's page dimensions programmatically? Or how is this usually done? It must be a common issue!

Thanks
Erik


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Page format

Answering myself:

> Is it even possible to set the printer's page dimensions programmatically?

Oups, I just found the set-printer-metrics function, which I had completely missed… The "See also" sections in the CAPI documentation is a bit sparse sometimes…

Erik


29 maj 2012 kl. 10:29 skrev Erik Ronström:

> 
> Hi folks
> 
> Does anyone have experience of using different page formats for different documents in the same application?
> 
> Using (capi:page-setup-dialog) lets the user choose a page format, which I can then query with capi:get-printer-metrics. This seems to update the global printer (current-printer) and works fine as long as the formatting takes place in the printing process.
> 
> But in my case, I want a more WYSIWYG approach, where line breaking etc on screen reflects what is going to be printed. So each document needs to store its own dimensions. But then I would need to roll my own page setup dialog! Is it even possible to set the printer's page dimensions programmatically? Or how is this usually done? It must be a common issue!
> 
> Thanks
> Erik
> 
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
> 


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


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