Jump to content

Convert multiple xmls to pdf using xsl-fo

Recommended Posts

Hi, I've a scenario wherein I've to convert multiple documents into a single pdf. A collection contains the respective xmls of the documents and I've to loop through them. in the loop, the obtained xml is converted to intermediate xsl-fo and then using fo processor; to a pdf file. I'm using byteArrayOutputStream for the final conversion. After the loop ends, I'm writing the output to response using the 'write' method of byteArrayOutputStream. Now the problem is that the output pdf contains only one document which was present last in the collection. Is there any way wherein all the documents can be converted into single pdf or is it like xsl-fo doesn't have the capability to take in multiple files and convert to single pdf?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...