[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Trouble printing a KHTMLPart
From:       Luke Monahan <lukemonahan () gmail ! com>
Date:       2007-06-21 2:42:26
Message-ID: 200706211242.26548.lukemonahan () gmail ! com
[Download RAW message or body]

Sorry for replying to myself but:

I've just worked out that printing to a PDF file from a KHTMLPart within 
Konqueror is failing with exactly the same error when converting from PS to 
PDF.  Printing directly to a postscript results in an unreadable PS file.  In 
fact, printing from Kate is giving the same problem.

There seems to be a problem with my whole KDE install (3.5.7 on Kubuntu 
Feisty).

Any help would still be appreciated, but it seems that the code below is not 
at fault.

Thanks,

L.

On Wednesday 20 June 2007 19:37:59 Luke Monahan wrote:
> Hi All,
>
> I'm trying to set up a small program to load a KHTMLPart at a specified URL
> and print without further interaction from the user.
>
> The print options will be different depending on the page loaded and a few
> other arguments, so I can't simply use the "print(bool quick)" DCOP call.
>
> I've done this in ruby (korundum) so far, but I don't believe the problems
> I'm having are related to the bindings.
>
> For the moment I'm just trying to get a manually configured print to work
> before I go about setting preferences in code.  It all appears to work, but
> the print job fails and presents me with a large ghostscript error:
>
> gs -q -dSAFER -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
> -sOutputFile=$out{/home/ltmon/print.pdf} -sPAPERSIZE=a4 -c .setpdfwrite -f
> '/tmp/kde-ltmon/kdeprint_Gs4QxaX6' : execution failed with message:
>
> **** Warning: glyf overlaps cmap, truncating. ERROR: /rangecheck in --get-
> Operand stack: <stack snipped by me>
>
> The relevant section of my code:
>
> printer = KDE::Printer.new
> if printer.setup(self) then
>       printer.fullPage = false
>       painter = Qt::Painter.new
>       painter.begin(printer)
>       @browser.paint(painter, Qt::Rect.new(0,0,800,600), 0, true)
>       painter.end
> end
>
> Any help or ideas what I'm missing would be much appreciated.
>
> Thanks,
>
> Luke.

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic