Re: Need Help with XPCOM Exception in getPrintPreviewNumPages
"krithika" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <1173943799.191928.274510__42732.9825157814$1173943837$gmane$org@o5g2000hsb.googlegroups.com> |
On Mar 6, 8:30 am, "krithika" <[email protected]> wrote: > 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 I resolved this by adding settings.setShowPrintProgress(false); Krith