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

Free Support Forum - aspose.com

Aspose_Words_Symbol_Issue

Hi,
We are using Aspose Words 22.10 with JDK version 8 on CentOS 7.

We have installed all the basic fonts, msttcorefonts and specific symbol.ttf as well.

  1. Still we are facing issue with symbol font character
  2. Table structure is empty but it is cutting off.
    Attached Input/Output here,
    Aspose_Words_Symbol_Issue.zip (764.6 KB)

@rutuja.mahajan

  1. Could you please attach Symbol font which is installed in your CentOS environment. The problem might occur because Windows “Symbol” font is a symbolic font (like “Webdings”, “Wingdings”, etc.) which uses Unicode PUA. MacOS or Linux “Symbol” font on the other hand is a proper Unicode font (for example Greek characters are in the U+0370…U+03FF Greek and Coptic block). So these fonts are incompatible and Mac/Linux “Symbol” font cannot be used instead of Windows “Symbol” without additional actions. For example the standard bullet in Windows Symbol font is U+F0B7 (or U+00B7 which also can be used in MS Word for symbolic fonts), but in Unicode font it is U+2022.

  2. In your document the table goes beyond the page bounds. But since the document contents revisions, that they are displayed in balloons, you see the whole table. You can achieve the same using Aspose.Words by configuring it to render revisions in baloons:

Document doc = new Document("C:\\Temp\\in.docx");
doc.getLayoutOptions().getRevisionOptions().setShowInBalloons(ShowInBalloons.FORMAT_AND_DELETE);
doc.save("C:\\Temp\\out.pdf");

Thank you for your response.

  1. Check the source code (already handled Unicode font) & the symbol.ttf ,
    Source_Code_And_TTF_File.zip (47.1 KB)

  2. Thanks, it is working as expected with the provided code.

@rutuja.mahajan Thank you for additional information. In your code you handle only \uF0B7 character - regular bullet point:

But in your document bullet symbol used in the list is \uF0FF.

Also, I have tested conversion of your document on my side using your code and font an the problem is not reproducible.

Yeah, but same code not working for me. I will try by adding \uF077 in the code.
Is there any generic solution to handle for all symbol number formats?
e.g. level.getNumberFormat().startsWith("\uF0")

Also in above screenshot are you using any tool to check symbol character code?

@rutuja.mahajan Unfortunately, there is no other general solution except using Windows Symbol font.

So you mean to say,

  1. The bullet symbol used in the document (\uF0FF) is not windows font and there is no code fix,
    even if we try to handle same as \uF0B7
    Can not set fontname and number format like this?
    e.g.
    level.getFont().setName(“Unicode”);
    level.setNumberFormat("\u2022"); // By setting relevant NumberFormat for \uF0FF here ?

  2. Also it can not be resolved by adding any other .ttf font file?

@rutuja.mahajan I mean that you should use the Symbol.tff from Windows OS, which is different from the Symbol.tff font provided in Linux and Mac OS. So these fonts are not fully compatible.

We have copied this Symbol.ttf from windows system only.
Do you see any difference in file which I have sent earliar?
Can you share the Symbol.ttf which works for you?

@rutuja.mahajan Sure, here is the symbol.ttf font form my Windows machine: symbol.zip (46.2 KB)
Also, please note, if you use Windows symbol.ttf, the workaround with replacing characters is not required.
Please try putting all required font into a separate folder and use this folder as the fonts source. By default Aspose.Words uses system fonts source, so symbol.ttf font might be taken from your system.
In addition, please note that you change font name in your code, that also can affect the result:

level.getFont().setName("Unicode");