This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Multiple pdfs in one stream

mohhad wrote on 2015-03-25:
Hey guys,

I need help with one issue.

I have multiple html strings fetched from various places. And I need to combine them into 1 pdf document.

Currently I am calling client.convertHtml(pdfMarkUp, ms) for each html string with the same memory stream.

The stream is getting larger and all that, but I end up with the last conversion.

Please note that each html string is a standalone markup (ie. With html and body)

Can I get a solution for this?
support wrote on 2015-03-26:

PDF concatenation is a non-trivial operation. It is not possible to join multiple PDFs just by writing them sequentially to a single stream.

In your case, I would recommend that you create a separate PDF file for each HTML string and then concatenate them using a third party tool (for example pdftk).