Aspose words square boxes issue

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

  1. Square boxes are converted in nos, on both Windows and CentOS7.
  2. There are no of pages mismatch on CentOS 7.
    Do you see any specific font missed?
    Also If we copied installable fonts from Windows to Linux will it work?

@rutuja.mahajan the following fonts used in your document are not available on my side.

Font 'CG Times' has not been found. Using 'Times New Roman' font instead. Reason: alternative name from document.
Font 'Univers Bold' has not been found. Using 'Courier New' font instead. Reason: font info substitution.
Font 'CommercialPi BT' has not been found. Using 'OpenSymbol' font instead. Reason: font info substitution.
Font 'Univers' has not been found. Using 'Arial' font instead. Reason: alternative name from document.
Font 'Univers Bold Italic' has not been found. Using 'Arial' font instead. Reason: alternative name from document.

To build the document layout Aspose.Words requires the fonts. So to get an accurate rendering results the fonts used in the document must be available in the environment where the document is rendered. If Aspose.Words cannot find the fonts used in the document the fonts are substituted . This might lead into the layout difference, since substitution fonts might have different font metrics. You can implement IWarningCallback vto get a notification when font substitution is performed.
To get the same rendering result on different OSs the same set of fonts should be available in the environments. Please see our documentation to learn how to specify fonts location:
https://docs.aspose.com/words/java/specify-truetype-fonts-location/

Hi,

After callback implementation we got all the missing fonts and we installed those on our environment, still it adds up one more extra page. Can you please check this latest output,
Output2.pdf (113.1 KB)

@rutuja.mahajan I have just answered this question in another you topic:
https://forum.aspose.com/t/aspose-words-indent-and-pages-mismatch-issue/258646/4
Or maybe you have attached a wrong PDF document in this topic.

If the problem still persist, please attach, your fonts, I have listed above, here for testing.

No, this is correct output.pdf. Do we need same set of fonts in this case as well?

@rutuja.mahajan Yes, to have the same result of document rendering on different machines, the same set of fonts should be available on these machines.

Sorry my mistake, I have attached wrong output.
Please check this one,Output2.pdf (147.5 KB)

@rutuja.mahajan Could you please attach the following fonts here for testing?

Font 'CG Times' has not been found. Using 'Times New Roman' font instead. Reason: alternative name from document.
Font 'Univers Bold' has not been found. Using 'Courier New' font instead. Reason: font info substitution.
Font 'CommercialPi BT' has not been found. Using 'OpenSymbol' font instead. Reason: font info substitution.
Font 'Univers' has not been found. Using 'Arial' font instead. Reason: alternative name from document.
Font 'Univers Bold Italic' has not been found. Using 'Arial' font instead. Reason: alternative name from document. 

These fonts are not available on my side.

Here is the list of fonts Missing_Fonts.zip (850.9 KB)

@rutuja.mahajan Thank you for additional information. As I can see if use the attached fonts MS Word also shows 2 pages in the document: ms.pdf (270.3 KB)

Also, for some reason MS Word cannot use some of your fonts and renders checkboxes improperly. In addition some of the attached fonts are not recognized as a valid fonts:

Hi,

Now I have removed all such problematic fonts and using valid fonts, still the issue persist, can you please check with these fonts Corrected_Fonts.zip (191.5 KB)

@rutuja.mahajan Thank you for additional information. Still MS Word on my side shows 2 pages in your document. Here is DOCX document created from your input DOC file with all the fonts embedded: test.docx (7.1 MB)

As you can see one paragraph is moved to the next page in MS Word document, list like Aspose.Words does upon rendering document to PDF: out.pdf (157.9 KB)
So, Aspose.Words behavior matches MS Word behavior and is correct.

Also, if use only the fonts you have attached in your last post, Aspose.Words detects that some fonts are missed:

Font 'Univers' has not been found. Using 'Arial' font instead. Reason: alternative name from document.
Font 'Univers Bold Italic' has not been found. Using 'Arial' font instead. Reason: alternative name from document.
Font 'Univers Bold' has not been found. Using 'Courier New' font instead. Reason: font info substitution.
Font 'CommercialPi BT' has not been found. Using 'OpenSymbol' font instead. Reason: font info substitution.

Hi,
Somehow 2 doc files are created on my side, with single and multiple pages.
Now its resolved.
Thanks a lot for all your help!

1 Like