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

List:       pykde
Subject:    Re: [PyQt] Printing from QWebView (contents visible) gives a set of
From:       "ivanko.rus" <ivanko.rus () gmail ! com>
Date:       2011-08-23 2:10:17
Message-ID: CAB30t5+1R-GdTti8=UoSu-obmChKqWS1wKYg2jecQ5SkWpcR=w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thank you for answering. The strange thing is that my versions are the same
as yours. But well, I made an ultra-dirty hack by passing the QWebView's
HTML to a QTextEdit and then printing it from there, so for now it will
serve (the pages I am loading into my QWebView are actually pretty simple).
But thanks anyway!

2011/8/21 Hans-Peter Jansen <hpj@urpla.net>

> On Sunday 21 August 2011, 19:52:41 ivanko.rus wrote:
> > Good afternoon! Recently I was trying to print a Web page from
> > QWebView and ran into a pretty weird problem. It is the following: I
> > can print my QWebView perfectly when setting the QPrinter's output
> > format to PDF or PostScript. But when I try to print to a normal
> > printer, however, it gives me the correct number of pages, only that
> > the pages are all blank. I tried to do this with a virtual PDF
> > printer in Windows, a normal printer (it had ink, btw =), tried to
> > choose the "print to file" option on Windows, and the results were
> > all the same. The other thing that puzzles me even more is that if I
> > replace the QWebView with a QTextEdit, everything works perfectly
> > with all kinds of printers. So I hope that someone can give me a
> > little help, I would appreciate it very much. Thank you!
>
> You missed to tell us something about your versions.
>
> Works here with:
> python: 2.6.2
> sip: 4.12.4
> qt4: 4.7.1
> pyqt4: 4.8.5
> os: Linux
>
> Note, that printing is implemented quite differently in Windows and
> Linux, and QWebView is somewhat complex in itself.. It might be a
> printer _driver_ problem, which aren't that uncommon with Windows (but
> who cares: it's the industrial standard by definition).
>
> Pete
> _______________________________________________
> PyQt mailing list    PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>

[Attachment #5 (text/html)]

Thank you for answering. The strange thing is that my versions are the same as yours. \
But well, I made an ultra-dirty hack by passing the QWebView&#39;s HTML to a \
QTextEdit and then printing it from there, so for now it will serve (the pages I am \
loading into my QWebView are actually pretty simple). But thanks anyway!<br> <br><div \
class="gmail_quote">2011/8/21 Hans-Peter Jansen <span dir="ltr">&lt;<a \
href="mailto:hpj@urpla.net">hpj@urpla.net</a>&gt;</span><br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> <div class="im">On Sunday 21 August 2011, 19:52:41 \
ivanko.rus wrote:<br> &gt; Good afternoon! Recently I was trying to print a Web page \
from<br> &gt; QWebView and ran into a pretty weird problem. It is the following: \
I<br> &gt; can print my QWebView perfectly when setting the QPrinter&#39;s output<br>
&gt; format to PDF or PostScript. But when I try to print to a normal<br>
&gt; printer, however, it gives me the correct number of pages, only that<br>
&gt; the pages are all blank. I tried to do this with a virtual PDF<br>
&gt; printer in Windows, a normal printer (it had ink, btw =), tried to<br>
&gt; choose the &quot;print to file&quot; option on Windows, and the results were<br>
&gt; all the same. The other thing that puzzles me even more is that if I<br>
&gt; replace the QWebView with a QTextEdit, everything works perfectly<br>
&gt; with all kinds of printers. So I hope that someone can give me a<br>
&gt; little help, I would appreciate it very much. Thank you!<br>
<br>
</div>You missed to tell us something about your versions.<br>
<br>
Works here with:<br>
python: 2.6.2<br>
sip: 4.12.4<br>
qt4: 4.7.1<br>
pyqt4: 4.8.5<br>
os: Linux<br>
<br>
Note, that printing is implemented quite differently in Windows and<br>
Linux, and QWebView is somewhat complex in itself.. It might be a<br>
printer _driver_ problem, which aren&#39;t that uncommon with Windows (but<br>
who cares: it&#39;s the industrial standard by definition).<br>
<br>
Pete<br>
_______________________________________________<br>
PyQt mailing list    <a \
href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br> <a \
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" \
target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br> \
</blockquote></div><br>



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

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

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