Ramkumar
Ramkumar

Reputation: 842

PDF in XPages without using iText?

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?

Upvotes: 1

Views: 2229

Answers (5)

Russell Maher
Russell Maher

Reputation: 378

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

Upvotes: 1

stwissel
stwissel

Reputation: 20384

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

Upvotes: 3

MarkyRoden
MarkyRoden

Reputation: 1074

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

Upvotes: 1

Naveen
Naveen

Reputation: 6936

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.

Upvotes: 2

Simon McLoughlin
Simon McLoughlin

Reputation: 8465

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.

Upvotes: 1

Related Questions