Going from Version 3.9.0.0 to 6.3.0 - losing page numbers in toc

First of all, some background: I have been using aspose.words and aspose.pdf in version 3.9.0.0 for the past several years. My workflow is as follows:

  1. Use aspose.words to generate a word document from html source.
  2. Save the word document as a doc file for my users to access.
  3. Add a table of contents to the document.
  4. Save the word document as Aspose.Words.SaveFormat.AsposePdf XML file to convert to PDF.
  5. Use BindXML to convert the XML file into a pdf for my users to access.

It recently came to my attention that occasionally in step 5 spaces were being lost between words. The spaces appeared in the XML file but not in the resulting pdf file I tried updating to a newer version of Aspose.pdf and the missing space issue went away. However, I am encountering other issues, including the fact that in my table of contents page numbers are being replaced by the string 888. I encountered this particular issue in using version 4.1.2 as well as 9.3.0. Is there a document that instructs how to migrate from aspose.pdf 3.9.0.0 to later versions?

I am attaching the xml file that is generated and the pdf files that were generated with v3.9.0.0 and v6.3.0 so you can see the difference.

Thanks.

Laurie

Hi Laurie,

Thanks for using our products. Please visit the following link for instructions on

  • Migration from Aspose.Pdf Pre-6.x
  • How to Use New Aspose.Pdf for .NET API
  • How to Use New Documentation

Please note that latest release version of Aspose.Words for .NET provide the feature to directly save the source word files into PDF format without using Aspose.Pdf for .NET. So now you can simply use one product to save word files into PDF format. Please try using the latest release version of Aspose.Words for .NET and in case you encounter any issue, please feel free to contact. Please visit the following link for instructions on How-to: Convert a Document to PDF

I’m trying to do this with the path of least resistance. Upgrading to the new aspose.words will likely require a not insignificant time input, especially to generate the table of contents. What I would really like is instructions on how to upgrade my current code so that the xml file generated will provide the information necessary to generate a correct table of contents. I have run into font issues using aspose.pdf 6.3 and have gone back to trying it with aspose.pdf 4.1.2 to alleviate those issues but still have the issue with the page numbers in the toc showing up as 888. Please, if there is a fairly easy way to fix this issue, I’d much appreciate it. The basic question is: what is it in the xml file that could be changed to enable the bindxml to generate a correct table of contents?

Thanks.

Laurie

Hi Laurie,
Thanks for your request. As my colleague mentioned, we do not longer support old method of PDF conversion. With the latest version of Aspose.Words you should use direct to PDF method:
https://docs.aspose.com/words/net/convert-a-document-to-pdf/
Actually, with the latest version of Aspose.Words you can easily generate TOC in your document. Please see the following link for more information:
https://docs.aspose.com/words/net/working-with-table-of-contents/
Here you can find guidelines how to update your code:
https://docs.aspose.com/words/net/aspose-words-for-net/
Best regards,

Well, that conversion was a LOT easier than I thought it was going to be. Pending receiving the temporary license and doing some testing, testing, testing, we’re nearly good to go.

Thanks!

Laurie

Hi Laurie,
It is perfect that it was easy for you to change your code. Please feel free to ask in case of any issues. We are always glad to help you.
Best regards,