Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Browser Widget execute() Acrobat Reader 7 - exception thrown
Browser Widget execute() Acrobat Reader 7 - exception thrown [message #458425] Wed, 13 July 2005 14:23 Go to next message
Kalman Hazins is currently offline Kalman HazinsFriend
Messages: 76
Registered: July 2009
Member
Hi, group.

I am using the browser widget to display an Adobe Acrobat (pdf) file. I have
a print button on the screen and have the following code in the listener

printButton.addSelectionListener(new SelectionAdapter() {

public void widgetSelected(SelectionEvent e) {
browser.execute("window.print()");
}

});

The idea is to print a pdf document displayed in the browser when you click
the print button.

The above code works fine when I use acrobat reader 5, but throws a
NullPointer exception at line 810 of Browser class when I use acrobat reader
7.

Upon debugging, I realized that for some reason it cannot get the
"parentWindow" property and therefore throws a NullPointer exception.

Any ideas before I "bug" it?

Thanx,
- Kalman
Re: Browser Widget execute() Acrobat Reader 7 - exception thrown [message #458471 is a reply to message #458425] Thu, 14 July 2005 03:19 Go to previous message
Billy Biggs is currently offline Billy BiggsFriend
Messages: 94
Registered: July 2009
Member
Kalman wrote:
> The above code works fine when I use acrobat reader 5, but throws a
> NullPointer exception at line 810 of Browser class when I use acrobat reader
> 7.
>
> Upon debugging, I realized that for some reason it cannot get the
> "parentWindow" property and therefore throws a NullPointer exception.

You should definitely post a bug about this. SWT should not be
throwing NPEs.

-Billy
Previous Topic:bug ? calling refresh on treeviewer in treeExpanded function mess up the tree
Next Topic:Dialog layout and resize problem
Goto Forum:
  


Current Time: Fri Apr 19 23:39:10 GMT 2024

Powered by FUDForum. Page generated in 0.02961 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top