My requirement is to create a number of separate PDF files from different HTML pages and then merge them all together and save the final file.
Currently, I am using the PDF converter to create a number of temporary PDF files on the server, and then merge those files.
I can't delete the temp files after the merge is complete. I get an error: "The process cannot access the file '[filename.pdf]' because it is being used by another process."
So instead of leaving all these temp files on my server, it would be great if I could write the files to a memory stream and then merge the files from the stream and output the final pdf.
Alternatively, it may be easier to just delete the temp files. Could someone explain how to close the pdf files so i can delete them?
Code attached.
Can anyone help?
Thanks,
Matt
Generator_63640661.zip