The above code has src as source pdf file, dest as destination pdf file and temp file to be attached to the src file to generate dest file.
I want to integrate this code with my existing application. The existing application uses different technology(not itext) to generate pdf using following piece of code.
The variable data holds Byte Array equivalent of pdf. Later in the application the data is flushed as follows in servlet as follows
I want to attache a file to this pdf byte array stored in the variable. Please let me know if it is possible. I have tried a couple of things to store the data in temporary pdf, and then add attachment to it and then flush the new byte, but it is not working as expected.