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.

Thu Oct 08, 2020 4:03 pm

Hello,
I have downloaded Spire.Doc for Java trial version yesterday, and tried converting one RTF file to PDF.
It works in Windows
However when I deployed the same code to Linux (Centos 6), I got the following exceptions.
I have included Spire.Doc.jar in classpath.
Please check:

java.lang.IllegalStateException: Cannot find table 'loca' in the font file.
java.lang.IllegalStateException: Cannot find table 'loca' in the font file.

rajeevnair
 
Posts: 2
Joined: Wed Oct 07, 2020 6:35 pm

Fri Oct 09, 2020 3:48 am

Hi,

Thanks for your inquiry.
Please make sure the used fonts in RTF file have been installed on your Linux (Centos 6).
If you still have the issue, please provide input file for further investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Oct 09, 2020 6:51 pm

Thanks Betsy, it is working now in Centos 6. I will let you know if there are more questions.
After purchasing license, do we get a different JAR file to download? How does that work? Please let me know

rajeevnair
 
Posts: 2
Joined: Wed Oct 07, 2020 6:35 pm

Sat Oct 10, 2020 2:28 am

Hi,

Now the latest commercial version is Spire.Doc for Java Version:3.9.4.
After purchasing, you will get a license. Then please refer to following guide to remove the warning message:
https://www.e-iceblue.com/Tutorials/Lic ... ply_by_Key

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Dec 18, 2020 10:20 pm

perhaps a personal problem with my computer but Ive tried to view this twice, the file opens up and displays momentarily then goes blank white.

JR

BrandonDam
 
Posts: 3
Joined: Fri Dec 04, 2020 8:29 pm
Location: Украина

Mon Dec 21, 2020 1:26 am

Hello,

Thanks for your inquiry and sorry for the late reply as weekend.
To help us have a better understanding on your issue, please provide more detailed information to help us investigate further, including your input file (if any), your full test code and your output file.
Thanks in advance for your assistance.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Mon Dec 28, 2020 6:40 am

Hello,

How is your issue now? Could you please give us some feedback at your convenience?

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Fri Jul 14, 2023 7:09 am

i have been useing this jar
,Manifest-Version: 1.0
Extension-Name: spire.doc
Implementation-Title: spire.doc for java
Implementation-Version: 4.3.6


my company has buy a licenses.
there is issue i faced.Cannot find table 'loca' in the font file.it worked fine on winodws,but when i published to linux centos system.it give me this error.it that my linux system should install some font to make it work??? what should I do?
I try to install windows font to linux and not work
this iusse is when i call this method doc.saveToFile(pdfPath, FileFormat.PDF); form doc to pdf.
please help me ,i 'm despired for solution

shenmegui
 
Posts: 2
Joined: Fri Jul 14, 2023 7:04 am

Fri Jul 14, 2023 9:35 am

shenmegui wrote:i have been useing this jar
,Manifest-Version: 1.0
Extension-Name: spire.doc
Implementation-Title: spire.doc for java
Implementation-Version: 4.3.6


my company has buy a licenses.
there is issue i faced.Cannot find table 'loca' in the font file.it worked fine on winodws,but when i published to linux centos system.it give me this error.it that my linux system should install some font to make it work??? what should I do?
I try to install windows font to linux and not work
this iusse is when i call this method doc.saveToFile(pdfPath, FileFormat.PDF); form doc to pdf.
please help me ,i 'm despired for solution

Hello,

Thank you for your inquiry.
You can install the corresponding fonts in Linux, or you can specify the fonts using the following code. Additionally, since the version of Spire.Doc you are using is quite old, we recommend using the latest version of Spire.Doc for Java (Version 11.7.0).
Code: Select all
  Document document = new Document();
        Paragraph paragraph = document.addSection().addParagraph();
        //Specify a private font path
        PrivateFontPath fontPath = new PrivateFontPath("font name","C:\\Windows\\Fonts\\STXINGKA.TTF");
        TextRange tr = paragraph.appendText("Spire.Doc for Java");
        //apply font
        tr.getCharacterFormat().setFontName("font name");
        ToPdfParameterList toPdfParameterList = new ToPdfParameterList();
        List pathList = new LinkedList<>();
        pathList.add(fontPath);
        toPdfParameterList.setPrivateFontPaths(pathList);
        document.saveToFile("F:\\Zhang\\Mission\\7\\7.14\\Output\\EmbedFont1.pdf",toPdfParameterList);

If you continue to experience issues during testing, please provide your Linux system information, such as Ubuntu-20.04.3, for our reference.

Sincerely,
Wenly
E-iceblue support team
User avatar

Wenly.Zhang
 
Posts: 149
Joined: Tue May 16, 2023 2:19 am

Return to Spire.Doc