merge pdf

  
Hi,

I have a webservice that returns a pdf without any letterhead. And I have different stationairy templates available, these are also pdfs containing different company logo's and addresses.
I want to allow users of my espace to choose with which stationairy template (letterhead) the webservice pdf should be merged before the end result is presented to them.
Does anyone how to execute the pdf merge with Outsystems? I can do it in a command prompt with external tools but I'm looking for a better way.

Any help would be much appreciated.

Karel
For this kind of data manipulation you'll need to create an extension using Integration Studio.

If you have a .NET or Java library which performs the operation you want, it's a relatively simple matter of creating the necessary API in Integration Studio, implementing the actions, publishing the extension, adding it as a reference to your eSpace and finally calling the actions.

If all you have is a command line, you can use .NET / Java to execute that command line in the extension, although this might prove a bit more challenging than if you have a library that does the work for you.
Thanks Ricardo. I'll look into it. 
Hi there
The solution of Ricardo is really helpful.BTW,i want to know that whether there is a powerful program which supprots to merge multipage pdf files at one time.My present pdf merge program can only merge single pdf files.Thanks for any suggestion.
You can use iTextSharp to develop an extension that merges PDFs. It's fairly straight forward.

I've attached an extension that does just that, so you can have a look at the commented code :)
It has two actions:
  • MergePDF (First_PDF, Second_PDF) - Returns a single binary with the two pdfs merged
  • MergePDF_Bulk ( PDF_Binary[ ] ) - Returns a single binary with all the PDFs in the list merged.
I'll publish it soon in the forge... :)

Best regards.

António Chinita wrote:
You can use iTextSharp to develop an extension that merges PDFs. It's fairly straight forward.

I've attached an extension that does just that, so you can have a look at the commented code :)
It has two actions:
  • MergePDF (First_PDF, Second_PDF) - Returns a single binary with the two pdfs merged
  • MergePDF_Bulk ( PDF_Binary[ ] ) - Returns a single binary with all the PDFs in the list merged.
I'll publish it soon in the forge... :)

Best regards.
 
 Hi, is your extension applicable for Java servers? I tried the attached file but it wont work.

Thanks in advance.
 
Check ITextSharp's lisence it's not free anymore. You can try to build your own extension with pdfbox (https://pdfbox.apache.org/)  for the java servers.  Pdfbox can also be used with c#  http://www.squarepdf.net/pdfbox-in-net


Best regards,

Stephan Schvers