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 Dec 15, 2022 2:39 pm

Hello.
Working with Java spire.doc, version 5.4.10, I got error Parameter 'emSize' 0.0 is invalid when trying to appendHtml.

I found that you solve this kind of issue with version 4.8.0, but there is still problem in some specific html code.
Here is code:
Code: Select all
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
  <tr>
      <td align="center" style="font-size:0px;padding:40px 10px 10px 10px;word-break:break-word;">
        <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" >
            <tr>
              <td>
                  <table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="float:none;display:inline-table;">
                    <tr>
                        <td style="padding:4px;">
                          <table border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:transparent;border-radius:3px;width:50px;">
                              <tr>
                                <td style="font-size:0;height:50px;vertical-align:middle;width:50px;"><a href="http://www.facebook.com" target="_blank" style="color: #000000;"><img alt="Facebook" height="50" src="https://d70shl7vidtft.cloudfront.net/editor/social-icos/simple/facebook.png" style="border-radius:3px;display:block;" width="50"></a></td>
                              </tr>
                          </table>
                        </td>
                    </tr>
                  </table>
              </td>
            </tr>
        </table>
      </td>
  </tr>
</table>


If I have "font-size:0px" on line 3, I got this error. But only in case, that it is used with units, no matter if it is px, em, rem or cm.
If used without units "font-size:0" everything is working well.

Interesting is that in other cases it does not matter, only in this specific case. E.g., if there is not any code inside <td> from line 3, no error message is thrown.
And also, on line 12 I am able to use "font-size:0px" with units or without units with no error.

matus.vandak
 
Posts: 18
Joined: Fri Sep 02, 2022 10:00 pm

Fri Dec 16, 2022 7:03 am

Hi,

Thanks for your inquiry.
I did some tests and reproduced the issue you mentioned, I have logged the issue into our bug tracking system with the ticket number SPIREDOC-8899, our development team will investigate and fix it. Sorry for the inconvenience caused. Once there is any good news, we will inform you asap.

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Thu Jan 12, 2023 8:04 am

Hi,

Glad to inform you that we just released Spire.Doc for Java(version:11.1.1), which fixes the issue SPIREDOC-8899. Please download the new version from our website (https://www.e-iceblue.com/Download/doc-for-java.html) or import it from maven repository :
Code: Select all
<repositories>
    <repository>
        <id>com.e-iceblue</id>
        <name>e-iceblue</name>
        <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>e-iceblue</groupId>
        <artifactId>spire.doc</artifactId>
        <version>11.1.1</version>
    </dependency>
</dependencies>


Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Thu Jan 12, 2023 11:41 am

Hi
I can confirm that in version 11.1.1 it is working fine.
Thank you for your effort.
Best regards

matus.vandak
 
Posts: 18
Joined: Fri Sep 02, 2022 10:00 pm

Fri Jan 13, 2023 2:51 am

Hi,

Thanks for your feedback.
I’m glad to know that your issue is solved. If you have any other questions related to our products, just feel free to contact us.

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.Doc