Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Wed Apr 08, 2020 11:15 am

i used
Code: Select all
new Document(docFullPath).getPageCount();
to get a doc page;but it reminds me
Code: Select all
 Cannot found font installed on the system
。if i only need get filePages without fonts ,how could i do?

hanjunjun
 
Posts: 3
Joined: Thu May 09, 2019 2:08 pm

Wed Apr 08, 2020 11:16 am

i used
spire.doc.free-2.0.0

hanjunjun
 
Posts: 3
Joined: Thu May 09, 2019 2:08 pm

Thu Apr 09, 2020 3:14 am

Hi,

Thanks for your inquiry.
When executing document.getPageCount(), we need to read the font information used by the text from the system if the required fonts are not embedded into document, and then we calculate the height of the content through the font information and then compare it with the page height to do the paging, so as to get the page count. So fonts are essential.
As for your case, please make sure the required fonts are installed into your system, or you embed the required fonts into your document.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2448
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc