Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

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: 2772
Joined: Wed Jun 27, 2012 8:50 am

Tue May 07, 2024 6:03 am

Hi,
Document document = new Document();
for (int i = 0; i < wordFiles.Length; i++)
{
string pdfPath = Path.Combine(path, $"{Guid.NewGuid()}merged_document.pdf");
files.Add(pdfPath);
document.LoadFromFile(wordFiles[i]);
document.SaveToFile(pdfPath, FileFormat.PDF);
}
I use Spire.Doc , but I am getting error. My word font is Times New Roman. How can I solve this problem?

Vusala_Zeynalova
 
Posts: 2
Joined: Tue May 07, 2024 6:00 am

Tue May 07, 2024 7:24 am

Vusala_Zeynalova wrote:Hi,
Document document = new Document();
for (int i = 0; i < wordFiles.Length; i++)
{
string pdfPath = Path.Combine(path, $"{Guid.NewGuid()}merged_document.pdf");
files.Add(pdfPath);
document.LoadFromFile(wordFiles[i]);
document.SaveToFile(pdfPath, FileFormat.PDF);
}
I use Spire.Doc , but I am getting error. My word font is Times New Roman. How can I solve this problem?


Hi,

Thank you for your message.
Are you using our latest version? If not, we recommend to test again with our latest version of Spire.Doc(12.4.7).
Also, if the error is related to fonts, please make sure that the fonts used in Word document are installed on your system environment.
If it doesn't work, please let us know the specific error you're experiencing and provide a test file for us to test. Thanks in advance for your collaboration.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 269
Joined: Mon Nov 07, 2022 8:10 am

Tue May 07, 2024 7:50 am

I use FreeSpire.Doc

Vusala_Zeynalova
 
Posts: 2
Joined: Tue May 07, 2024 6:00 am

Tue May 07, 2024 8:08 am

Hi,

Please first make sure that the fonts used in Word document are installed on your system environment.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 269
Joined: Mon Nov 07, 2022 8:10 am

Thu Jun 27, 2024 9:37 am

In my case (converting to pdf on iOS and Android) all that was needed is to embed fonts into .docx file.

greatvova
 
Posts: 1
Joined: Thu Jun 27, 2024 9:21 am

Fri Jun 28, 2024 6:54 am

Hello,

Thanks for your inquiry.
Regarding your issue, please refer to this tutorial(Embed uninstalled fonts by font document when convert word to PDF) to convert your word file to pdf file. If you have any other questions, please feel free to write to us.

Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 373
Joined: Mon Dec 27, 2021 2:23 am

Wed Jul 03, 2024 1:23 pm

Hi can u pls tell the way to install fonts in azure web app

dothrakikinng
 
Posts: 1
Joined: Wed Jul 03, 2024 11:55 am

Thu Jul 04, 2024 3:03 am

Hi,

Thank you for your inquiry.
Based on your situation, I recommend that you put the required font files into a directory, then embed them in your project. After that, you can use document.setCustomFontsFolders("fonts folder path"); in your code to pass in the font directory for use. If you still encounter any issues, please let us know.

Sincerely,
Doris
E-iceblue support team
User avatar

Doris.Liu
 
Posts: 269
Joined: Mon Nov 07, 2022 8:10 am

Return to Spire.Doc