Working with PDF files in XPages apps

I'm just making this quick short note to save myself a few searches next time I'll need this:

Do you want to manipulate PDF files, for example to merge them? Use Apache PDFBox. Version 2.0.1 works just fine on Domino, API is well documented and reading PDF files from notes documents is easy - EmbeddedObject has method getInputStream().

Comments

iText?

Hi Martin. I know that iText licensing is not free, but which do you prefer? Apache PDFBox or iText.? Is Apache PDFBox easier or pretty much the same as iText?

Re: iText?

It's basically the licensing that made me to look for alternatives. Both libraries do their job just fine. If you're ok with LGPL or with using commercial version of iText, I wouldn't migrate if I were you (provided you already work with iText). But for new projects - or those where LGPL is not an option - I'd use PDFBox.

Obscure

It's not just that its not free but is also very obscure with no published price list that I could see.

Print Web Page

I had to do a rush job for a client and decided that printing the webpage itself was easiest. So with some clever CSS and other great tips off the web, like page breaks, the users print straight off the web page (XPage) to PDF.
It really looks good. But now I want to use PDFBox in the future. The only thing that I don't like is that it takes so long to work out each line, line item, tables and so on.
But I will definitely take a look into PDFBox.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
2 + 17 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.