Show pdf in JavaFX application - pdf

I read the following posts: JavaFX: Display PDF in WebView, Displaying pdf in JavaFX
But there occur some problems for me:
The links of JPedalFX do not work any more and I can't find example codes on the web.
I don't want to use Swing-components in an JavaFX-application.
The solution with PDF JS doesn't work either, because Maven is used in the project and I don't want to put the library in the resources folder.
JxBrowser would be a possible solution but cost too much.
Any ideas?

Related

How to generate PDF offline with UWP

I'm developing a UWP app for tablet and i need to generate a PDF with data from SQLite. I need to do this completely offline because where I will use the app there is no connection. What could I do?
I'd prefer not to use paid libraries like Syncfusion and XFinium so I'm trying to find an alternative solution.
I tried with iTextSharp but unfortunately I can't find a good documentation to render a complex PDF or to export a Bitmap generated from a Grid Component to a PDF File.
Why not render your data into a webpage displayed with a WebView control? Then you can use any permissive licensed javascript library to generate the PDF.
If it hasn't changed much, then you can only send text back and forth between your WebView and UWP app, but that's workable. Your final PDF result can be read back as a base64 encoded string.
A very quick search found this one that seems easy to use and you can just download the source to put into your app:
https://github.com/MrRio/jsPDF

how to use pdf.js or viewerJS to display pdf in browser

i need a tuto about using pdf.js or viewejs to view pdf via browser. I found viewerjs.org but it doesn't help.
Any help thx in advance.
Try out pdf.js as it is very simple. Download the latest version here.
To show the pdf files traverse to web/viewer.html and it should load its default pdf.
As to the question about how to show your pdf's use: viewer.html?file=relative/path/to/your/pdf.
Say for example inside the web folder(the one in which viewer.html is there) of your pdf.js you create a directory say named pdfFiles and in it you add a pdf named say mypdf.pdf in it then to display it use: viewer.html?file=pdfFiles/mypdf.pdf and it will display it.
Almost all browsers are supported. Look here to know more about which all browsers are currently being supported.

sencha touch pdf generation form client side

We are working on creating mobile app using sencha touch frame work. one of our requirements is when user hits view pdf, the user entered form details which stored locally has json format should be rendered and view as pdf and also it can be saved as a pdf locally.
i found that itext is one of the java library which is widely used for pdf generation. but i couldn't find any article inter relating both sencha touch and itext. let me know is that a possible way or any other method available for json to pdf generation in sencha touch.
Regards
java has nothing to do with javascript.
A quick Google search of "javascript pdf generation" lists some libraries that may work but getting them to run on a device might be more trouble than its worth id look at submitting the form results to a server and downloading the resultant PDF.
this might point you in the right direction:
generating-pdf-files-with-javascript

Multiple photo upload using struts1

We happened to get requirement to upload the multiple files ( like the gmail attachments ) using struts 1.3.5 and Ajax.
I happened to go thorough lot of resources but no luck.
Can someone shed light on this possibly by suggesting or pointing to some useful resources.
I was also looking for a multiple file upload solution for my struts2 application. Since ajax form submit do not support image submission the only option to use was a hidden iframe strategy. However, i found this wonderful plugin which uploads multiple files withour reloading the page and also shows a cool progress bar. The best thing about this plugin is that it doesn't uses flash and works on IE too. I strongly recommend using this plugin
Donot use taglibrary defined file upload for uploading. You can still use
common- fileupload to handle file upload. By doing this you can dynamically
add one more input type file element below the current input type upload using
javascript. I doubt if there is any way to do this using pure struts 1.3.5 :) .

QuickLook plugin displaying an image and some infos

I'm currently writing a QuickLook plugin, and I wondering how I can display an image and some information about that image at the same time, similar to http://www.code-line.com/software/sneakpeekphoto/ .
There is only one way to do so: Convert your content to an already supported one. This means either PDF or HTML. There are two options you have:
For static information you create a simple PDF preview by rendering a view into a PDF. (Use -dataWithPDFInsideRect: method of NSView)
For dynamic information create a HTML page with links and so on. QuickLook will then show it. (I think this is also the way your example does it.)
We have not found a way to create complex previews on ur own and had to stick to one of the methods, too. Keynote and Pages do the same -- they convert their presentations to multi-page PDF previews...