html to pdf in java plugin [duplicate] - java

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Converting HTML files to PDF
List of HTML to PDF converters
We want an java plugin to convert html to pdf, that will integrate with our app. is that possible with any java plugins?, we dont want to purchase it every time especially number of users for one app something like that. we will integrate that plugin with our app. we are not going to show that there plugin inside our app.but there is need of printing html on browser and as well need to produce pdf for that HTML in our app. we want plugin for our application. is there any java /java server plugin .
Please let us know that if this suitable to our requirements. any reply that would be great help.
Thanks and Regards
kumar kasimala

You can use itext library for this purpose

Try the PDF Converter services. It supports loads of formats including HTML and works from any Web Services capable environment including Java and .net.
Here are some examples:
Converting using the web services interface
Converting HTML
Note that the articles may mention SharePoint a couple of times. Don't worry, the product is not tied to SharePoint, it just happens to be used a lot in that environment.
Big disclaimer, I worked on the product so I am obviously biased about how fantastic the product is :-)

Related

DevExpress Charts for Java

I'm using DevExpress Web Development Charts for JavaScript charts.
I got a big surprise when I downloaded the trial for testing some basic implementation. It downloads an .exe file with a couple of samples implemented in .NET technology.
Well, for my project I must use Java/JSP. Is it possible to use the HTML5 charts of DevExpresswith Java? I've been looking in the downloaded files but it seems a bit complicated to extract only the js/HTML code related to the charts.
So, my question is: is it possible to use DevExpresscharts with JSP? If yes, where can I download the required libraries?

Convert html+css+js to PDF

I want to create something like this (code is here):
in pdf format. I'm using google charts and regarding to this forum converting chart to pdf is impossible. I've already tryied iText+XMLWorker, but there is some problem with css and any js supporting at all, I think.
So, the questions are: How can I convert html+css+js to .pdf file? Or, may be, the issue have other variants?
As promised in the comment, I've asked Raf. This was his answer:
One way to use XML Worker for HTML+CSS+JS is to use a browser engine to preprocess the HTML. Examples of such a browser engine are WebKit (Chrome, Safari) and Gecko (Firefox). These can interpret the CSS and JS and give you HTML that is ready to be parsed by XML Worker.
Examples of competing products are:
wkhtmltopdf, a command line tool that uses WebKit as its rendering engine.
Prince XML supports HTML+CSS+JS to PDF using their own engine.
Maybe there are others, but this is what Raf told me. I hope this helps.

Convert Lotus Notes RichText to PDF programmatically

I want to convert Notes Richtext into PDF in a server program (preferably Java). Is there any sample code how to do that. Converting to HTML/MIME isn't an option since the conversion process is too lossy.
I did some tests with DXL, some XSLT code and XSL:FO, via FOP. It produced some PDF output. Project abandoned due to lack of funding (read: no customer).
The basics, in a recent document: http://www.ibm.com/developerworks/xml/library/x-xslfo/
You'll need to find some third-party software to help, as this isn't possible out of the box. Here's one that looks promising: SWING Software's Lotus Notes Export to PDF

Converting JavaScript generated documents/pages to PDF

I'm using xhtmlrenderer + iText in Java to generate PDFs for some pages in my application. I've managed to convert some pages already. However, I came across a limitation to this approach where it can't convert pages dynamically created using JavaScript scripts (some by JQuery). Are there other available tools for this?
Thanks.
Your best bet is wkhtmltopdf. It's a PDF converter sitting on top of web kit, complete with its JS environment. I haven't tried it myself (yet).

GWT document format converter

I am searching on ways to make a small app using GWT for converting documents
from one format to other.
Mainly these formats .doc , .pdf , .odt , .rtf.. and maybe a couple
more.
Has anyone tried this before??
I came across the library JODConverter but it needs open office to be
already installed and i don't really know how many people have used it
with gwt in past.
Please give me some starting pointers, or if anyone has experience
with this kind of app, do share.
Thanks and regards,
Rohit
I was looking into implementing something like this a few month ago.
Since GWT compiles your code to JavaScript there is no way for you to do that on the client side, JavaScript can't access the file system.
So you would need to upload the file to the server first and do the conversion on the server side and send the converted file back.
I have never heard of JODConverter before, the the library I wanted to use was Apache POI . Unfortunately I can't tell you anything about it, because I haven't tried it yet.
It sounds like JOD Converter is precisely what you need since you're looking at multi format conversions from Java. You would install OpenOffice on your server and link it up with JOD Converter. When a document is uploaded, your application would call JOD Converter to perform the conversion and stream the converted document back to the caller. Alternatively you can put the file somewhere, and send a link (URL) back to the caller so they can fetch the document. You can also look at JOD Reports or Docmosis if you need to manipulate the documents.
GWT is mostly a client side toolkit. Are you trying to make a tool that does all the conversion on the client side, with no help from the server? In that case, you should be looking for JavaScript libraries that can read/convert all those formats. If you are planning to have the user upload their files to the server, then you can use whatever technology you want on the server, and just use GWT for the UI.

Categories

Resources