Merge Document 'cannot access file being used by another process'

Merge Document 'cannot access file being used by another process'

Forum member · Sep 20, 2021
When trying to write to just one field with the MergeDocument type, I get this error on some pdf's and not others. Not quite sure what is going on.

Re: Merge Document 'cannot access file being used by another process'

Support · Sep 21, 2021
Hi, Please try loading the source PDF in the form of byte array and see it resolves the issue on your end. Here is a code sample: //Load input PDF in the form of byte array using PdfDocument class. byte[] pdfByteData = File.ReadAllBytes(@"Source PDF file path"); PdfDocument pdf = new PdfDocument(pdfByteData); MergeDocument document = new MergeDocument(pdf); Thanks, ceTe Software Support Team

Re: Merge Document 'cannot access file being used by another process'

Forum member · Sep 21, 2021
That worked perfect! I should have thought of that. Thanks again.