Generate PDF Java spring mvc (without IText) [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have been working on my own project for the past few months and i have stumbled upon a problem. I need to attach some data from database(in pdf format) to emails i will be sending to clients. I know this could be done using Itext, but for commercial licence they charge around 1300$ for 2500 emails which is insane.
Do you guys know any other library i could use in my application i plan to offer commercially? Any other idea which will help me solve this problem will be greatly appreciated!
Cheers

I used PDFBox in the distant past. Admittedly, I was using it for reading PDF files, but it did a good job and seemed well-designed.

First you can try
flying saucer
Basically it uses an old version of iText which was free (more here)
Flying Saucer will allow you to render PDF on server-side from an HTML template (CSS 2.1 is supported) - we're using this solution (with mustaches templates) in our project
Another option (valid for Google Chrome) - you can do PDF exporting on client, just calling window.print() and using Chrome "Print to PDF' functionality

You can use Apache's FOP library for generating PDF. It is released under Apache 2 licence.
https://xmlgraphics.apache.org/fop/

Related

Java PDF generating library [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Which Java PDF library to use in commercial project? I need to generate a printable (and good if it will be editable, like .xls) report (it contains table, some text and report's total page count - this is because I can't use HTML( I can't calculate page count)).
P.S. I can't use iText because it's licence don't allow to use free version of iText in commercial projects.
Thanks.
We are in the same boat at my job, and are moving to pdfbox. For what it's worth, generating real print quality PDFs (like, ones that get printed hardcopy by a print company) for office documents is somewhat non-trivial. In my experience, distiller does the best job. But PDFBox is certainly more straightforward if that will meet your print needs.
You can use below three Java libraries to create HTML+CSS template to makeup your PDF file.
Flying-saucer + Freemarker + Itext
Flying-saucer:https://code.google.com/p/flying-saucer/
Freemarker: http://freemarker.org/
Itext 2.1.7: http://itextpdf.com/ (Please note this is the free version of iText in commercial projects.)
You can also Check this project which is using these three libraries:
https://github.com/xiang-lee/pdf-generator
Personally I have used Apache FOP supports several output formats. You might also be interested in JasperReports it supports pdf, html, excel and openoffice.
Apache PDFBox perhaps?
http://pdfbox.apache.org/
iText wasn't always under AGPL. You might consider using iText 2.7 or 4.2 which are under LGPL.
See also this question: What is latest version of itext that is not AGPL?

Generating a PDF report in Java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I've been handed the task (not sure if i like it or not) of generating a PDF export in an eclipse RCP app. I'm looking for a framework with as little effort as possible I can pass in a pojo model and some kind of template and presto.. get a PDF report back. I've taken a look at BIRT and I'm sure it offers that functionality just was hard to read through all the stuff does anyone have a tool they use to do this that is really easy or any ideas of how to move forward? Thanks - Duncan krebs
iText is great for generating all kinds of PDFs, but If you're going to do reports, then I have to recommend JasperReports.
Also, you can use iReport to simplify the design of your jasper reports.
I think the most widely used framework for this purpose is iText. Be sure to check out the terms of use.
I use iText with Spring. A good example can be found in Springs tutorial at Spring pdf

Open source OCR [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm looking for an open source OCR library that runs on Linux. I need this to work for PNGs and PDFs. Mostly I would like to interface this library from java or ruby. Any idea if there is anything available?
Regards.
Tesseract is a very good OCR engine: https://github.com/tesseract-ocr/tesseract
The project has been launched by HP Labs and is now continued and sponsored by Google (for Google Books !). It is released under the Apache license, and it runs on Linux. It uses Tiff or PNGs files ; for PDFs, you will need to convert to one of these formats. I suppose that there is no binding so you should invoke this software as a subprogram...
Cuneiform is free and does a decent job. You could invoke it as a subprogram but there's no language binding that I know of. It won't read PDFs directly but you can easily take apart PDFs that are sequences of scanned images to feed them to Cuneiform. There are also scripts to reassemble the images and text back into a searchable PDF.
Try tesjeract, which uses JNI to call Tesseract OCR API.
For PDF, you'll need to convert them to image first, using GhostScript, for instance.

Java - converting html with images in CSS to pdf [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am looking for a free java library to convert html to pdf. Html page is formatted with CSS, and those styles contains images (.gif). At the moment I am using Flying Saucer but this library cant convert CSS with images properly.
Thanks in advance.
Marek
I use YAHP.
http://www.allcolor.org/YaHPConverter/
It does have CSS. I have had issues with some CSS styles, such as the roundborder ones specific to chrome/firefox, but it does have CSS. I can't remember ever having a problem with CSS images.
one lame way (but hey you may be desperate) is there is a java library for contacting openoffice running as a headless server. This is http://www.artofsolving.com/opensource/jodconverter ... and use openoffice to convert. OTOH, this is pretty kludgy, and definitely not pure java) and I'm not sure how good the openoffice html import filter is ... but I guess it's worth looking at. There used to be some html to pdf converters built into iText but they have been removed (and were pretty limited).
Try this HTML to PDF converver: http://pd4ml.com/index.htm. It's writen purely in Java
Try the Adobe -Generate PDF API (Java)-- http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/common/html/wwhelp.htm?context=sdkHelp&file=000447.html - here you can see the how to, and at the bottom, a quickstart which contains working sample java code to convert a web page into PDF.
Prince XML is the best and easiest to use PDF generator I've used. A commercial license costs a pretty penny, but if you're OK with a small watermark on the first page of your document, the free version is great. It can be integrated with a number of programming languages, including Java.

Java PDF Library that works on GAE? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Since GAE has severe restrictions like - "A Java application cannot use any classes used to write to the filesystem"...
Is there a good Java PDF library that can write the PDF to memory for streaming to the cloud?
You can use iText without limitations now. There is no need for a patch since version 5.2.0 anymore.
Have a look at the following post for an example: Generate PDF using GAE and iText
According to this thread on google groups (requires authentication), PDFjet can be used on GAE (it has been slightly modified to replace files by streams at a few places). As they say in the thread:
It's a quite low-level library but should be ok for simple tasks.
As of now, both iText and JasperReports are listed as incompatible on the "Will it play in App Engine" page due to the dependence on several classes that are not in the JRE class whitelist.
Update (2010/09/26): As mentioned by Guido in a comment (and I thank him for that), some people claim they have an iText patch to make it compatible with GAE. Worth the try if you want to play with iText.

Categories