Error while converting DOC to PDF using Aspose.Words.Document method SaveToPdf with bookmarks

We are trying to convert HTML to DOC using word template which contains bookmarks. We are able to insert data by opening the word document template file through bookmarks and save it as word document. But while trying to save the same document to PDF Aspose.Words is throwing exception:
Item has already been added. Key in dictionary: ‘bmHeaderCreationDate’ Key being added: ‘bmHeaderCreationDate’
Note: ‘bmHeaderCreationDate’ is bookmark name.
Please find attached the sample word document file which contains the bookmarks and need to be converted to PDF.
Kinldy provide the solution ASAP as we are proposing this solution to our client. Without resolving this solution we cannot tell our client to buy this.

Hi
Thanks for your request. I managed to reproduce the problem on my side and created new issue #6952 in our defect database. I will notify you as soon as it is fixed.
As a workaround you can try removing all bookmarks from the document. See the following code for example:

Document doc = new Document(@"Test046\in.doc");
doc.Range.Bookmarks.Clear();
doc.SaveToPdf(@"Test046\out.pdf");

Best regards.

The issues you have found earlier (filed as 6952) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by alexey.noskov.