Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » PDF Viewer plugin AWT/SWT problem
PDF Viewer plugin AWT/SWT problem [message #278487] Mon, 03 January 2005 22:47 Go to previous message
Bernd Hofner is currently offline Bernd HofnerFriend
Messages: 68
Registered: July 2009
Member
I'm looking for a way to display PDF files (usually just a one page
technical drawing) on one page of a MultiPageEditor.
Is there a simple to use PDF plugin around?
I Googled around a bit but couldn't find one.

I found a JavaBean from Adobe wich I tried to integrate, but this didn't
work out:

public class ToolFrameEditor extends MultiPageEditorPart
{
....
addPages() {

Composite composite = new Composite(getContainer(), SWT.EMBEDDED);

Frame awtFrame= SWT_AWT.new_Frame(composite);
awtFrame.setLayout(new BorderLayout());
try
{
pdfViewer= new com.adobe.acrobat.Viewer();
}
catch(Exception e)
{
e.printStackTrace();
}


awtFrame.add(pdfViewer);
try
{
FileInputStream in = new FileInputStream(myFileName);
pdfViewer.setDocumentInputStream(in);

idxPDFPage= addPage(composite);
setPageText(idxPDFPage, "PDF View");
pdfViewer.activate();
}
catch(Exception e)
{
e.printStackTrace();
}

}


The problem is that Adobe pops up a Licence Dialog as soon as the
com.adobe.acrobat.Viewer()
is created.

This dialog has the tendency to stay invisible, which would make
acknowleging it, hmm, difficult.
But even if it does show up, it doesn't react to mouse or keyboard input
(mouse cursor shows as hour-glass).

I guess this happens because the pdfViewer has not been added to the
awtFrame, yet, so that the SWT events
are not passed through.

Can anyone shed some light here?

Thanks,

Bernd
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:loading / updating plugins
Next Topic:Extension point change
Goto Forum:
  


Current Time: Tue May 21 14:41:00 GMT 2024

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

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

Back to the top