Hi,

I am using Qt-Jambi4.6.3 windows jars.

This is what i am trying to do -

I have written this class  -

public class Doc2PDFDemo2 extends QWebPage
{
QWebPage page ;
public Doc2PDFDemo2()
{
 page = new QWebPage();
}

public void print()
 {
page.loadFinished.connect(this, "loadFinished()");
page.mainFrame().load(new QNetworkRequest(new QUrl("
https://xhtmlrenderer.dev.java.net/";)));
 }

public void loadFinished()
{
 page.setViewportSize(page.mainFrame().contentsSize());

QPrinter printer = new QPrinter();
 printer.setOutputFileName("output-QtWebKit.pdf");
printer.setOutputFormat(QPrinter.OutputFormat.PdfFormat);
 page.mainFrame().print(printer);
System.exit(0);
}
}

And then in calling class i write this in main method -

public static void main(String args[])
{
 QApplication.initialize(args);
Doc2PDFDemo2 widget = new Doc2PDFDemo2();
 widget.print();

QApplication.exec();
}


The URL I tried is this - https://xhtmlrenderer.dev.java.net/

Now if you open this url in browser, and run this code the generated pdf
does not contain the left hand side frame.

Also links are not working.

Thanks,
Shilpi



On Wed, Sep 1, 2010 at 3:30 PM, <qt-jambi-interest-requ...@trolltech.com>wrote:

> Send Qt-jambi-interest mailing list submissions to
>        qt-jambi-interest@trolltech.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
> or, via email, send a message with subject or body 'help' to
>        qt-jambi-interest-requ...@trolltech.com
>
> You can reach the person managing the list at
>        qt-jambi-interest-ow...@trolltech.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Qt-jambi-interest digest..."
>
>
> Today's Topics:
>
>   1. help on webFrame.print(printer) method (Shilpi)
>   2. Re: help on webFrame.print(printer) method (Helge Fredriksen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 1 Sep 2010 12:01:22 +0530
> From: Shilpi <shilpi.an...@gmail.com>
> Subject: [Qt-jambi-interest] help on webFrame.print(printer) method
> To: qt-jambi-interest@trolltech.com
> Message-ID:
>        <aanlkti=kb=qsf+ra90_ffvp8=2swzegvz2a6y1z_q...@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I am trying to do use print method from WebFrame.  the output pages are not
> coming complete. some or the other frames go missing.
>
> Can someone please suggest, what can be wrong?
>
> Thanks
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.trolltech.com/pipermail/qt-jambi-interest/attachments/20100901/f7cc0ce6/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Wed, 01 Sep 2010 10:36:53 +0200
> From: Helge Fredriksen <h...@poseidon.no>
> Subject: Re: [Qt-jambi-interest] help on webFrame.print(printer)
>        method
> To: qt-jambi-interest@trolltech.com
> Message-ID: <4c7e10a5.9030...@poseidon.no>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hello!
>
> Could you post a code sample demonstrating the problem? Also, it would
> be useful with some system description / version of QtJambi you're using.
>
> Regards,
> Helge Fredriksen
>
> On 09/01/2010 08:31 AM, Shilpi wrote:
> > Hi,
> >
> > I am trying to do use print method from WebFrame.  the output pages
> > are not coming complete. some or the other frames go missing.
> >
> > Can someone please suggest, what can be wrong?
> >
> > Thanks
> >
> >
> > _______________________________________________
> > Qt-jambi-interest mailing list
> > Qt-jambi-interest@trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
> >
>
>
>
> ------------------------------
>
> _______________________________________________
> Qt-jambi-interest mailing list
> Qt-jambi-interest@trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
>
>
> End of Qt-jambi-interest Digest, Vol 32, Issue 1
> ************************************************
>
_______________________________________________
Qt-jambi-interest mailing list
Qt-jambi-interest@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to