I might have to make some Java classes that dynamically create strings with HTML tags. I remember years ago there was a third party library that wrapped such things nicely, ie html.tableopen() instead of writing an HTMl table tag. Is there such a library that is part of standard Java distributions, now? If not is there a free (as in open source )library or a better to make HTML strings in Java?
The latest one I know is
http://rendersnake.org/examples.html
Related
I have checked multiple links and two options were shown for editing MS visio file in Java code.
Apache POI - HDGF and XDGF - Java API To Access Microsoft Visio Format Files
Aspose.diagram APIs
Has anyone done any coding in Java language using above option?
I am using eclipse IDE.
Also please suggest if there is third better way to edit MS visio file using java code.
If you are talking about libraries, these are the two basically. Apache POI AFAIK can't create diagrams, only read, if I am not mistaking - but please verify, maybe something changed since I last looked at that ten years ago.
So this basically leaves you with a single choice. Or you can always spend a few years and write it all yourself. Well, man does not simply walk into mordor create visio files with java.
Maybe you could consider using SVG instead, that can be generated and consumed by basically anything? Visio can also read and write SVG out of the box.
I am trying to recreate a C# program I made in Java. I used the the htmlagilitypack and XPaths to display text from a website in the C# program. Is there a library for Java in which I can use XPaths or is there a better way to do this? Thanks!
Check out jsoup -- a fairly-recent and decent-looking Java HTML parsing library, which seems quite powerful and easy to use, with nice CSS-like selector syntax for accessing content.
Is it a good idea? Well I have used other 3rd party Libraries like JSoup and it works great, but for this project it's different. Is it worth it to load and parse a whole document when you just want to get one item from it? Some of the html pages are simple too, so I could use String methods too. Reason is cause memory will be an issue, and it also takes some time to load the document too. When parsing XML I always use a SAX Parser because it doesn't load it in memory and it is fast. Could I use the same thing on html documents, or is there already one like this out there? So if there is a non-DOM HTML lightweight parser, that would be great too.
If the HTML is XML compliant (i.e. it's XHTML) then you can use a standard SAX parser. Here you can find a list of HTML parsers in Java to choose from: http://java-source.net/open-source/html-parsers. HotSax probably will handle all your use cases.
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 :-)
Open source implementation will be preferred.
Obviously, it isn't an easy task, PDF formatting is much richer than HTML's one (plus you must extract images and link them, etc.).
Simple text extraction is much simpler (although not trivial...).
I see in the sidebar of your question a similar question: Converting PDF to HTML with Python which points to a library (poppler, which is apparently written in C++, perhaps can be accessed with JNI/JNA) and to a related question which offers even more answers.
Only ones I know of have to be paid for.
BFO
JPedal
Try using PDFBox from the apache foundation.