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

List:       kde-devel
Subject:    Trouble printing a KHTMLPart
From:       Luke Monahan <lukemonahan () gmail ! com>
Date:       2007-06-20 9:37:59
Message-ID: 200706201937.59998.lukemonahan () gmail ! com
[Download RAW message or body]

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