Need Help with XPCOM Exception in getPrintPreviewNumPages

"krithika" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.java
Organization http://groups.google.com
Message-ID <1173151825.994721.105620__42885.6322229423$1173152136$gmane$org@n33g2000cwc.googlegroups.com>
Hi,

I have embedded Gecko engine , successfully loaded and obtained the
Document.But My goal is to get the page count of the loaded document.

getPrintPreviewNumPages() throws exception as shown

Exception in thread "Thread-3" org.mozilla.xpcom.XPCOMException: The
function "printPre
viewNumPages" returned an error condition  (0x80004005)
        at
org.mozilla.xpcom.internal.XPCOMJavaProxy.callXPCOMMethod(Native
Method)
        at
org.mozilla.xpcom.internal.XPCOMJavaProxy.invoke(XPCOMJavaProxy.java:
140)
        at $Proxy11.getPrintPreviewNumPages(Unknown Source)
        at DocumentProcessor.run(DocumentProcessor.java:132)
        at java.lang.Thread.run(Unknown Source)

My code is as shown.What am I missing?

stuck in this for past few days.

I also tried  with proxy object for print but same exception.

nsIWebBrowserPrint printProxy =
(nsIWebBrowserPrint)proxy.getProxyForObject(eventQueue,nsIWebBrowserPrint.NS_IWEBBROWSERPRINT_IID,
renderer.print,nsIProxyObjectManager.INVOKE_SYNC);

regards,
Krith
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.