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

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v11)  /  Merge Document 'cannot access file being used by another process'

DynamicPDF CoreSuite for .NET (v11) Forum

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.
Posted by a ceTe Software moderator
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
That worked perfect! I should have thought of that. Thanks again.

All times are US Eastern Standard time. The time now is 5:45 PM.