1

I am trying to make a PDF file. And also the notes documents are the contents. I have a clear idea with iText.

But is there any other solution for making PDFs without using iText?

RivieraKid
  • 5,923
  • 4
  • 38
  • 47
Ramkumar
  • 874
  • 11
  • 27
  • What is your concern regarding iText? Knowing why you're looking for alternatives would make it easier to identify what acceptable alternatives exist. – Tim Tripcony May 08 '12 at 12:32

5 Answers5

3

Apache FOP using XSL:FO is a way you can generate PDF (and other formats) from XPages. I'm in the process to write an article series on my blog detailing my approach and solution. Ultimately, once I got the spare time, I'll bundle all up and release it on OpenNTF

stwissel
  • 20,110
  • 6
  • 54
  • 101
2

You can give Apache PDFBOX a try. I used it to export text contents and it worked just fine. Also it is available under Apache license so it can be used in proprietary software unlike iText which is available under Afero GPL which is restrictive than Apache license. On the downside Apache PDFBOX is less mature than iText so it has less features and documentation available.

Naveen
  • 6,786
  • 10
  • 37
  • 85
  • Thanks Naveen., Here also we are in need of using external jar file. But this is also one way. Thanks again., – Ramkumar May 08 '12 at 09:46
  • PDFBox is Apache licenced while iText is GPL. I like PDFBox and used it long before it became an Apache project (I even sponsored the then student lead dev with 50 bucks :-) ) – stwissel May 09 '12 at 02:18
  • @stwissel: I checked [iText's website](http://itextpdf.com/) and it says that the latest version is available under GNU Affero General Public License version 3. I think the previous versions (v2.x) were available under GPL. – Naveen May 09 '12 at 05:11
  • The older itext versions (2.1.x family) are under LGPL license which is not that strict than the AGPL license. – Rami Muurimäki May 15 '12 at 06:39
1

There is a custom control on openntf that converts data into pdf's.

http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=XPages%20PDF%20Exporter%20Custom%20Control

Edit: My mistake this also uses iText.

Simon McLoughlin
  • 8,293
  • 5
  • 32
  • 56
1

I have used the FDF format to populate PDF template forms.

Create yourPDFTemplate.pdf and attach it to the database as a file Add a field "Name" to it and when you call the agent it will open the PDF file and fill the field with MarkyRoden

This is the lotusscript equivalent which could just as easily be done as an xAgent if you wanted to. If anyone wants me to I can create an example easily enough. Replace "MarkyRoden" with data from a notesdocument

Dim session As New NotesSession

Print |Content-type: application/vnd.fdf|
Print |%FDF-1.2|
Print |1 0 obj <<|
Print |/FDF <<|
Print |/Fields|
Print |[|
Print |<< /T (Name) /V (MarkyRoden) >>|
Print |]|
Print |/F (http://yourserver.com/mark/testing.nsf/yourPDFTemplate.pdf)|
Print |>>|
Print |>>|
Print |endobj|
Print |trailer|
Print |<< /Root 1 0 R >>|
Print |%%EOF|

End Sub

MarkyRoden
  • 1,074
  • 6
  • 21
  • Because of its tree structure I wonder if it would be possible to make PDF renderer for ordinary XPage/component - simply changing output generated by ordinary JSF engine... – Frantisek Kossuth May 09 '12 at 10:05
  • Sorry Marky for late response., I know that there is a way to do like you mentioned. But I do not know that how to implement. Means where do i call that agent. If I call this agent by a button click, It is not making the pdf. And If my application is in my local then what will I do? – Ramkumar Jun 06 '12 at 11:09
  • For this example - You need to have your PDF file attached to the database. It must have an editable "Name" field on it. From your web based application the Lotus Script agent could be called through a URL directly. – MarkyRoden Jun 06 '12 at 13:20
1

PD4ML is an option depending on what you are trying to do.

Russell Maher
  • 378
  • 1
  • 7