Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to open PDF from RCP and navigate in it
icon5.gif  How to open PDF from RCP and navigate in it [message #987072] Fri, 23 November 2012 10:01 Go to next message
Marin Aldimirov is currently offline Marin AldimirovFriend
Messages: 3
Registered: November 2012
Junior Member
Hi,
I have a plugin project with several views. The views show some objects which are described inside a PDF document. I need to open the PDF from my application and when a certain object is selected inside a view to navigate the PDF to its corresponding chapter so the user can see the complete description of that object (the PDF itself has links to the chapters where every object is described).

Question Can this be done and how?
Question What's the best way to do it?
- load the PDF inside an additional view
- load the PDF in a new floating window - I'd prefer this
- load the PDF with the default Adobe Reader (can I send navigation commands from Java to Adobe Reader to scroll to a desired position)
Re: How to open PDF from RCP and navigate in it [message #987443 is a reply to message #987072] Mon, 26 November 2012 16:00 Go to previous message
Marin Aldimirov is currently offline Marin AldimirovFriend
Messages: 3
Registered: November 2012
Junior Member
For now I found SumatraPDF, which is a program much like Adobe Reader, but has a better control through command-line arguments. I can use it with the following code:
Runtime rt = Runtime.getRuntime();
			try
			{
				rt.exec("<path>\SumatraPDF.exe -page 150 -zoom \"fit content\" -reuse-instance <path>file.pdf");
			}
			catch (IOException e)
			{
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

, but that just opens it as a separate program.
I would like to open the PDF as an additional view inside my RCP project and have the same functionality. For now I haven't found a good clear and easy step-by-step solution on the net.
Any suggestions would be appreciated!

[Updated on: Mon, 26 November 2012 16:01]

Report message to a moderator

Previous Topic:Eclipse 4.2.1
Next Topic:perspective with endless console error messages
Goto Forum:
  


Current Time: Thu Apr 25 12:32:48 GMT 2024

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

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

Back to the top