2

Hello I have an application XPages and now I need to create a button that create PDF that combining in one PDF file sources (XLS, WORD, JPEG, PNG etc..) from a richtext attachments.

Now I think that the best solution is used Acrobat Professional on server ...and the API (server side). But I don't know if this is a good solution.

Anyone has suggestions about this? I think that can I use Java Code (If there are the integration API) I'm looking at now Acrobat website and I see that Acrobat X use Javascript (But do you work only client?)

Daniele Grillo
  • 1,011
  • 4
  • 13
  • 31

1 Answers1

4

I use Java, Apache FOP and Apache pdfBox in an XPages project to create pdf files with included/attached files from richtext attachments.

It works well but is a lot of work...

Knut Herrmann
  • 30,880
  • 4
  • 31
  • 67
  • Hermann: you use this https://pdfbox.apache.org/1.8/cookbook/workingwithattachments.html for the attachments? – Daniele Grillo Jun 11 '15 at 07:57
  • That might work too but I used FOP for this http://stackoverflow.com/a/10412030/2065611 – Knut Herrmann Jun 11 '15 at 08:42
  • but I need to convert my source attachments in PDF before? How can I do? – Daniele Grillo Jun 11 '15 at 09:12
  • No, the files are included in pdf as MS Word, Excel, png, ... and you can create a "link" to those included files inside your pdf to open them with the connected application like MS Word, Excel, ... This way you don't need to convert the attachments. – Knut Herrmann Jun 11 '15 at 09:25
  • 1
    You can convert MS Word, Excel, ... to pdf though with Apache POI. You could merge several pdf files to one pdf file with Apache pdfBox afterwards. – Knut Herrmann Jun 11 '15 at 09:33