Open pdf within rcp application as a separate view - eclipse-plugin

My requirement is to open pdf files directly inside my RCP application as a separate view.
Currently the files are listed in a tree in the explorer view on clicking of which opens the installed adobe reader.
I want to open it inhouse .
Please suggest.

Was able to load a PDF file within a SWT basic shell but it does not further allow to perform any other operation on it(zoom,select text, scroll etc..).
The PDF basically shows up as a image(of the first page) & is not further interactive.
Any suggestion how to get this done would be helpfull.
For the sample SWT application to load a PDF I followed this link(used the program ID of acrobat reader instead of word from the registry) :
https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet262.java

Related

Preview pane for Microsoft Office files - VB.net

I have a treeview control based on the file system and I would like to implement functionality exactly like windows file explorer whereby a user can click on a file and it would display a preview in the preview windows/pane
I have already managed to do this for files such as images and PDF's with a web browser control but I'm struggling with Office files (xlsx, docx, pptx) as it opens the files in their respective applications rather than the preview window.
I've seen quite a few articles like this but can't find a working, or even semi-working example! Any help would be appreciated.

How to embed PDF viewer in DSPACE

How can I embed PDF viewer in my DSPACE instance. I have tried many solution but nothing works. There are many suggestion on DSPACE official site
https://wiki.duraspace.org/display/DSPACE/Document+Viewer+Integration
No soluton has a documnetation how to configure these viewer in dspace code.
I want a step wise soultion for embeding PDF Viewer. Please help me out of this problem. Thanks in advance.
I have researched through these site -
https://wiki.duraspace.org/display/DSPACE/Document+Viewer+Integration
http://peterpants.blogspot.com/2010/02/document-preview-in-dspace-using-google.html
It depends which version and which UI of DSpace you are using. I will describe roughly what we did to embed PDF.js into DSpace 6.3 JSPUI. We released all necessary code changes on github, so please take a look over there for details.
DSpace uses maven overlays to separate local code changes from the officially released code. Therefore, I will use paths within these overlays in the following description. If files that we changed do not exists within your local code repository, you have to copy them from there original location within [dspace-source]/dspace-jspui/src/main. It should also work if you do the code changes directly there, but I would consider that bad practice.
We added PDF.js and all files it needs to dspace/modules/jspui/src/main/webapp/static/pdfjs. We then changed dspace/modules/jspui/src/main/java/org/dspace/app/webui/jsptag/ItemTag.java. This class builds the item view. While I wish there would be a better separation of concerns, some HTML code is generated by this class, including the section of the item view that list all bitstreams. For every file that is listed, we check if its mime type is set to application/pdf and add a "preview" button for those files. The preview button links to the html site that renders the pdf viewer and loads the targeted file. We also added an attribute "download" to the default "Open/View" button, to ensure that it does not start another PDF viewer of the browser, but downloads the file. This is important to have one button called "preview" that opens the embeded PDF viewer and one button "download" that downloads the file to the user's computer. You can change the name of the button from "open/view" into "download" in the DSpace's message catalog. Last but not least we added JavaScript to dspace/modules/jpsui/src/main/webapp/display-item.jsp. The JavaScript suppress that the PDF viewer is loaded as a normal site, but loads it as an overlay over the item view, using JQuery UI. Then we wrote a small CSS file that helps us to position that overlay within the item view and referenced that file in dspace/modules/jspui/src/main/webapp/layout/header-default.jsp.
As mentioned above all these changes are published as open source under the DSpace Source Code BSD License on github.

PDF - Open Bookmarks Panel when pdf opens

When I open a certain pdf file on SharePoint, I wish to see the Bookmarks Navigation tab open by default. I can do this manually by File > Properties > initial View and changing the Navigation tab to "Bookmarks Panel and Page".
I need to do this with hundreds of pdf files and then upload them to SharePoint.
I am using VBA. I don't mind using other forms of automation.
Currently, I have AVDoc (CAcroAVDoc) and can open the Bookmarks Pane but it's not changed in the settings.
AVDoc.SetViewMode 3
I tried PDDoc.SetInfo etc but nothings changing the "settings".
Any suggestion will be appreciated.
I am running a lot of code in Excel VBA, that does a lot of pdf manipulation. The only thing that remains is to change the settings.
With Acrobat as the runtime, there is no scriptable interface to the initial view settings. However, you can easily use any of several .NET PDF libraries to make this change. A Google search for ".NET PDF Library" will yield both free and commercial varieties. You'll need to research which one is best for your task and skill set.

How to open a PDF file in pdf reader with vaadin?

A new Programmer here.
I was searching about open a PDF file with vaading. I can open it in the browser or download it without problem, but i need to open in a tab of my application, or at least open it in the predefined pdf reader and the Desktop class is not an option.
Can anyone help me? I only saw browser options, and now i was in war with the WT PDF Viewer class trying it.
Thank you a lot!
If you are using Vaadin 7 & 8, one possibility is to use Embedded since accepts Resource as parameter see API for Vaadin 8 here https://vaadin.com/api/framework/8.6.0/com/vaadin/ui/Embedded.html and Resource here https://vaadin.com/api/framework/8.6.0/com/vaadin/server/Resource.html You probably would use StreamResource .

PDF viewer for Blackberry

I want to make PDF viewer, I tried many open source libraries, but it failed, just as jpedal and PDF renderer the last one open blank pages, I don't want to use google docs to view the PDF, Is there an easy way to display PDF on my application?