Re: Printing support

"Benjamin Johnson" <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <op.v1mg08lxwkf1rx@boinggloing>
On Sat, 10 Sep 2011 16:54:26 -0400, corvid <[email protected]> wrote:

> Benjamin wrote:
>> I figured since we've got all that Fl_Printer stuff anyway, maybe we
>> should put it to good use.  So here's a (very early) patch to add
>> printing support to Dillo:
>>   http://dillo-win32.sourceforge.net/patches/30-print.diff
>>
>> It's turned on with a ./configure option (and disabled by default),
>> so you don't need to link in Fl_Printer if you don't want to.  I'm
>> not looking to get it into mainline yet, mostly I just want to show
>> what I've got so far in case anyone is interested.
>>
>> Here's an example of its output:
>>   http://dillo-win32.sourceforge.net/files/dilloprint.pdf
>>
>> Let me know what you think!
>
> That is an intriguingly small amount of code.

It's a lot smaller than I expected.  The main problem is it has to resize  
the viewport to the printable page area, and the viewport apparently  
doesn't like resizing smaller than the browser window.  This results in  
clipping, as you can see in the linked PDF.

(Admittedly it's a little ugly printing the viewport directly to  
Fl_Printer anyway, since we have to do nasty things to it so it will fit  
the page, but after four or five hours of experimentation this seemed to  
be the only thing that worked.  And this way, we at least get *everything*  
that's visible on screen, including form contents, etc.)

~Benjamin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.