I looked at various post for this and they were pretty helpful but am still not sure which is the best pdf viewer that i could use with servoy in web client .
My basic requirement is i have pdf bytes in my database and i need to just display it to the user in the browser itself so that user cant copy ,print the document and also if could just watermark that document.
I tried using jPedal in webclient but it did not work well , I think so jasper report is one of the options but its an unknown land for me and would appreciate your help on this .
Would writing the pdf to disk and then returning its url to the user be of any help? If they view the pdf in a browser they will be able to copy and print it, so this might not meet your requirements. Watermarking can be done with the PDF Pro plugin.
writing the pdf to disk and then returning its url to the user be of any help
Well thats the worst case scenario - but can u give me some input on how to do this on server side .Since i tried to create a temp file and then put bytes into the temp file and tried to get the url and embedd it into html arear in my form, but it did not work well.
If they view the pdf in a browser they will be able to copy and print it
Well if its watermarked i can pass on the copy requirement and i dont mind them printing the webpage , only thing is they should not be able to print a plain document and in a sense should not be able to save it .Sinceat presently i am just doing write file in which browser ask them whether they want to open or save .
Johan, the difference is, your method, just gives you a file download.
Westy’s method, shows it directly in a browser-window (if you have acrobat reader installed)
there is no difference, internally the same thing is being done.
also there if you give it a nice name (ends with .pdf) and the right mime type is send, it should just open it inside the browsers (which i really hate by the way, i don’t want to have it inside my browsers, i have an ‘app’ for that…)
With the PDF Pro plugin, you can watermark, and restrict the document from being printed.
If you want to hide the PDF url a bit, you could use something like http://docs.google.com/viewer?pli=1 and link into a webservice or jsp page which streams the pdf dynamically. You could add in some extra work to try to create a token like system so that the pdf may only be viewed in your app. however, technically savvy people can probably get around any restrictions you place
Hey guys thanks a lot really appreciating you help ,
If you want to hide the PDF url a bit, you could use something like http://docs.google.com/viewer?pli=1 and link into a webservice or jsp page which streams the pdf dynamically
if i am not mistaken than i could embedd google docs into my servoy form using iframe .Would apprecite if you could provide me some more inputs on that .
PDF Pro plugin
Thanks a lot it helps
create a token like system so that the pdf may only be viewed in your app
Yes i already have that kind of system for my rest calls .
Alright I found something Intresting and sharing just incase of it helps u guys
Recipe for Embedded PDF viewer In web-client
Html Area in a form (to send bytes - encode bytes with base 64 and serialize with json plugin and send to applet - i know base 64 makes it big but no need to create temp files )
3 ice pdf jars : core , viewer and applet in servoy-webclient root
Optional : Secret Patch of watermarking I kind of made something like pdf pro which takes bytes and return bytes - i will try to send that patch to servoy guy and see if he likes . (So u need that jar in plugins folder)
End Product Dish :
Sweet & Spicy Embedded Pdf Viewer with full text search and optional save and print options and many more features and all in web client .
And hey if u guys are lazy and need my edited version of dish mail me and i will send it you .