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

Free Support Forum - aspose.com

Document Page No Issue

Hi Alexey,

Do we have any update on the below mentioned issue (WORDSNET-24564).

Wanted to highlight one more point, in some cases we observed an erratic behaviour, if we use the below mentioned fonts using the below code snippet, it gives wrong page number for bookmarks. If don’t use them it gives correct ones,

· Open Sans

· Myriad Pro

· Helvetica


FontSourceBase[] originalFontSources = FontSettings.DefaultInstance.GetFontsSources();
string strFontFolderPath = Path;
FolderFontSource folderFontSource = new FolderFontSource(strFontFolderPath, true);
FontSourceBase[] updatedFontSources = { originalFontSources[0], folderFontSource };
FontInfoCollection fontInfos = doc.FontInfos;



@Biswarup_Dutta Unfortunately, there are no news regarding this issue yet. we will be sure to inform you once it is resolved.
As I already mentioned To calculate page index, Aspose.Words needs to build document layout and the fonts are required for this. If Aspose.Words cannot find the font used in the document, the font is substituted. This might lead into fonts mismatch and document layout differences and as a result incorrect page number returned. You can implement IWarningCallback to get notifications when font substitution is performed.
Most likely when the mentioned fonts are not available Aspose.Words uses other alternative font and accidentally returns the correct page number. Or there is no these fonts in the environment where you view the document in MS Word and MS Word substitutes the fonts and returns wrong page layout.