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

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 .

Related

Open pdf within rcp application as a separate view

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

How to open the PDF files in Powerbuilder windows application

I saved the datawindow in PDF format using SAVEAS method and I want to open the saved file in Acrobat reader. But in web application after save as method using Downloadfile() i'm able to open it. I think using OLEobject it is possile but i don't know how to do that. Any suggestions ?
If you just want to view the document (ie, no interaction with your PowerBuilder application) you can use the 'RUN' command.
Example:
RUN('C:\temp\mydoc.pdf')
This will open the file using whichever program is associated with .pdf files within your Windows settings.
We simply use the Internet context service to open the PDF URL:
inet l_inet
string ls_url
// set ls_url to the URL to open
GetContextService("Internet", l_inet)
l_inet.HyperlinkToURL(ls_url)

PDF file custom zoom level

i have a task about .PDF files that pdf file should open in browser with custom zoom level of 125% or 150%, i tried many times, but it is not working properly in firefox, as it implements zoom on PDF file but it switch on page#2, i study the adobe's given parameters for PDF file and tried to use them as following in href,
"SICS-47.pdf?page=1&zoom=125,0,0"
"SICS-47.pdf#page=1&zoom=125,0,0"
but no success, anyone here can help me please ?
thank you so much in advance.
The adobe partner reference states on page 5 that this is for IE and Netscape. I'm not sure how old this document is, but you might want to check the Firefox support for this functionality as it could be incomplete.
Reference: Adobe Partner
Another thing you could do is modify the PDF content to make sure the document opens properly. Depending on which tool you're using you could use a free library like the Perl API2 library or a paid tool like the Java iText library. Maybe there are command line tools out there that do the same, but I'm not aware of them.

Is it possible to configure OpenERP or my browser to open PDFs automatically?

Every OpenERP web report ask me if I want to keep the PDF. Of course I must keep it to view it. I end up with lots of PDF files that I have to clean up. I would like to configure OpenERP or my browser to automatically create and manage the temp PDF files.
My research shows me great confusion in the industry about security flaws in PDF files causing browser plugins that profess to being "PDF Viewers" to come and go. I have yet to find any method, procedure, plugin, add-on or magic incantation that views PDFs without me managing the file.
If you are using firefox and linux , why not open firefox & go to
Edit -> preferences -> applications ->
search for 'pdf' and in Action field select 'use(default)'.
This way the pdf will be stored in '/tmp' folder & opened from there.
You won't have to bother about managing it.
It is not possible in a clean way, you need a module that modifies the behaviour of openerp reports to be inline. There are two options:
https://github.com/buke/openerp-web-pdf-preview-print - I think this
is the best option as it works all the time, the caveat is it
launches a separated window like a popup (then you require to accept
popups).
https://www.openerp.com/apps/web_pdf_viewer - This is amazing as it
shows the pdf in the work area of openerp (no need to open a new tab
or a new window) but at the moment doesn't work at all times,some
reports are just downloaded instead of displayed (I dunno why).
BR
Andres Calle
www.trescloud.com

In search of a lightweight pdf viewer

I am looking for a lightweight pdf viewer ( commercial / free) for my windows application.
I presently display the pdf documents on a webbrowser with Adobe Reader Plug-ins.
Background :
The problem i am having with Adobe Reader is the Loading time. To display a pdf document for the very first time, Adobe Reader nearly takes 15 seconds !! .The application when deployed on customer locations (usually run on Windows Embedded OS) the pdf viewing time is still worse, sometimes takes more than a minute.
Hence i need to find an alternative for Adobe Reader.
My simple requirements are :
Lightweight - viewer should initialise itself and load the pdf as
fast as possible.
SVG support.
If anyone has any idea regarding such a tool. Kindly let me know
Regards
Srivatsa
Try : Foxit PDF SDK
Try SumatraPDF (Download full kit for MOZ plugin npPDFViewer.dll sorry there is NO IE.OCX)
For a minimal install use with the portable executable in same directory and you can call via DDE or command line
I think best light weight option for Windows is MuPDF for those who would rather not use any plugin in the Chrome.
http://mupdf.com/