Ash wrote:
Since we are executing merge of pdf documents in thread, Merging of pages from different doc is happening in parallel and hence pages are getting merged NOT in correct in final PDF document.
Is there a method in Pdfsharp component to sort the Pdf pages in Order using Page Number or any field to reorder the pages ?
It is up to you to keep track of the files. The final file will have the pages in the order in which they are added.
PDFsharp is not thread-safe, so you must use a single thread to add pages anyway. No merging in parallel. So there is no problem to keep track of the pages and where they are coming from.
I saw your code snippet on SO and it does not help me to understand what you are asking.
https://stackoverflow.com/q/75301923/162529