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

Free Support Forum - aspose.com

Stack Empty Error while saving to PDF after deleting a a paragraph from Header section

HI


I am trying to delete a paragraph from a word template and save the doc as pdf it gives me stack empty error

the code used to remove is provided below and i am doing it based on bookmark

DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToBookmark(bookmark);
if (builder.CurrentParagraph != null)
builder.CurrentParagraph.Remove();

after this when i call doc.SaveToPdf it shows stack empty error
the whole code works fine if i comment the above lines

Please Help on this

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Could you please attach your template here for testing? I will check the problem and provide you more information.

Best regards,