|
Re: Browser and PDF [message #786584 is a reply to message #785369] |
Mon, 30 January 2012 15:53 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
Hi Glen,
The likely cause is that you have the 32-bit PDF viewer plug-in
installed, which is not being successfully loaded by the 64-bit embedded
IE control. As a result the IE control is just launching the PDF viewer
stand-alone in a separate process.
To see this, launch stand-alone 64-bit IE [will appear in your Windows
programs list as "Internet Explorer (64-bit)"], navigate it to a .pdf
file, and I suspect you'll see the same behaviour.
Grant
On 1/28/2012 6:02 PM, Glen Zoerner wrote:
> Hi,
>
> I'm using the Browser to view PDF documents in the Win7 environment.
> With the 32-bit library it works beautifully. With the swt-3.6.2_64
> library and JRE 1.7.0_02-b13, the Browser window opens, a smaller window
> flashes (too quick to read) then the document opens in a separate Adobe
> Reader window. The Browser window remains empty.
>
> Any hints?
>
> Glen
|
|
|
|
Re: Browser and PDF [message #787433 is a reply to message #786830] |
Tue, 31 January 2012 15:17 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
One other possibility is to only ship your app based on 32-bit eclipse.
It'll work fine on 64-bit Windows as long as a 32-bit JRE is available
to run it. You likely don't need the extra addressable space that
64-bit gives (there are a few apps out there that really do need to be
able to address this much memory, but they're the exception, usually
dealing with huge complex models of things, etc.).
Also (I think relevant to your last response), if you're looking to
launch an external app then have a look at swt's Program class. It can
find you the OS-registered app for a given filename suffix, among other
things.
Grant
On 1/30/2012 4:25 PM, Glen Zoerner wrote:
> Grant,
>
> Many thanks for the quick response. Your explanation makes sense. The
> problem going forward is how to account for the 32-bit PDF viewer that
> my customers will probably have installed. I found another solution that
> involves using the rundll32 program that ships with Windows. It calls
> Adobe Reader or Acrobat directly. If there is a problem finding the
> Adobe executable, it fails silently.
>
> // fileName has a .pdf suffix
> public class Viewer {
> public Viewer(String fileName) {
> try {
> Runtime.getRuntime().exec("rundll32 url.dll, FileProtocolHandler " +
> fileName);
> } catch (Exception e) {
> System.out.println("Error" + e ); //print the error
> }
> }
> }
>
> The SWT library is fantastic. The performance is terrific. But the
> 32-bit vs 64-bit issue causes me to have two separate executables. Not a
> big deal but a logistics issue. Customers tend to not be too interested
> in these sorts of issues.
>
> Again thanks for your assistance.
>
> Glen
|
|
|
|
Powered by
FUDForum. Page generated in 0.03626 seconds