I need to create a brand new PDF based upon pages from existing PDFs.
Thank you very much for considering Aspose.
Please share the complete code snippet along with the sample PDF files, so we could share the issue at your end. I’m afraid, I can’t understand the problem completely from your post. I hope your code and the sample PDF files would help me understand and work on the issue.
We’re sorry for the inconvenience.
This is pretty simple to explain. I need a NEW PDF file based upon pages of OTHER PDF files:
First of all, in order to append a file to another one, you can’t use the same file as input and output, or a stream for that matter. You’ll have to use two separate files or streams for input and output. The reason is that when append method is working both of these files are in use concurrently. So, if you’ll use the same file as input and output, it will definitely get stuck.
Moreover, at one time, you can append only one file to another file. So, if you have created an output stream and you would like to use it as input stream for your next operation, you’ll have to copy the stream from the output stream to the input stream. But, that would be your custom solution. Aspose.Pdf.Kit doesn’t provide this kind of solution out of the box.
Please have a look at Append method and an article at this link.
I hope this helps. If you still find any issues, please do let us know.