Hi,
Thanks for your providing.
Please close or dispose doc document after finishing importing content. I tested the following code with Spire.Doc Version:5.5.211 for .NET4.0, and there was no any error.
- Code: Select all
Document finalDoc = new Document();
for (int i = 0; i < 10; i++)
{
Document doc = new Document();
doc.LoadFromFile("template_test.docx");
finalDoc.ImportContent(doc, false);
doc.Close();
doc.Dispose();
}
finalDoc.SaveToFile(outputPDF, FileFormat.PDF);
finalDoc.Dispose();
If the issue still exists, please tell us your system environment for further investigation. Thank you.
Best Regards,
Amy
E-iceblue support team