We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Merging PDF question

hello aspose,

I am using PDF Toolkit for merging multiple PDFs. I have a couple of questions that are important for me helping me to decide if I can use the component in a big application:

1) Whats the difference between the overloaded versions of Concatenate - either using filenames or streams? Does it make any difference concercing the performance ?

2) Is the Concatenate method "threadsafe" - can I use it on a background thread?

3) Is there an option for putting in an extra page break or leaving out empty pages? (probably not)

4) Do I have to dispose anything after a merge?

5) Is the toolkit 100% manged code?

Kind regards,

Victor

Hi Victor,

Please find answers to your questions below:

1) Whats the difference between the overloaded versions of Concatenate - either using filenames or streams? Does it make any difference concercing the performance ?

When using file names the files are accessed from the hard drive and output file is also saved on the disk, however in case of streams, the input and output files are kept in the MemoryStream objects; that is, the files are not accessed or written on the disk during the concatenate operation. The overload using streams might give you better performance in some situations because in that case the files are not accessed or written to the disk and Memory operations are always fast as compared to the disk operations.

2) Is the Concatenate method “threadsafe” - can I use it on a background thread?

Yes. Concatenate method is thread safe.

3) Is there an option for putting in an extra page break or leaving out empty pages? (probably not)

I'm afraid, not; however, you can add an extra empty one page PDF file in between during concatenation process.

4) Do I have to dispose anything after a merge?

No. You don't need to dispose anything after concatenation. However, if you're using the file or memory streams as parameters, you should close the stream objects.

5) Is the toolkit 100% manged code?

Yes. The Aspose.Pdf.Kit for .NET is 100% managed code.

I hope this helps. If you have any further questions or concerns, please do let us know.

Regards,