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

Free Support Forum - aspose.com

Checkbox with font 'Segoe UI Symbol' font is rendered as box at MAC using C#

Hi Aspose team,

I’m trying to convert a word file into a pdf file using aspose words 18.10.
The original word and the result pdf documents are Archive.zip (16.5 KB)
.
As you can see de char is not being generated correctly.
This works perfectly running the program on windows, but not for a Mac OS.
Is there any way to fix this?

Thanks in advance.
Paulo Pereira

@pamp

We suggest you please try the latest version of Aspose.Words for Java 19.11. Hope this helps you.

If you still face problem, please ZIP and attach your problematic output PDF here for testing. We will investigate the issue and provide you more information on it.

Hi @tahir.manzoor,
Thank you for the feedback.
I already tried with the Aspose words, 19.11 and the problem persists.
The problematic output PDF is exactly the same file shared on the archive above.
Please investigate this.

Kind regards,
Paulo Pereira

@pamp

We will test this scenario at MAC operating system and will share our findings with you soon.

Hi @tahir.manzoor,
Thank you for the feedback.
This is happen in Linux OS too.

Kind regards,
Paulo Pereira

@pamp

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-19679. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@pamp

After further investigation of this issue, we have noticed that this issue is related to missing fonts. Please make sure that you have installed ‘Segoe UI Symbol’. We have attached the output PDF with this post for your kind reference. 19.12.pdf (6.6 KB)

We suggest you please copy all fonts in a folder and use following code example to test this case. Hope this helps you.

public static void TestCase1() throws Exception 
{
        ArrayList fontSources = new ArrayList(Arrays.asList(FontSettings.getDefaultInstance().getFontsSources()));

        // Add a new folder source which will instruct Aspose.Words to search the following folder for fonts.
        FolderFontSource folderFontSource = new FolderFontSource("/home/tahir/Fonts/", true);

        // Add the custom folder which contains our fonts to the list of existing font sources.
        fontSources.add(folderFontSource);

        // Convert the Arraylist of source back into a primitive array of FontSource objects.
        FontSourceBase[] updatedFontSources = (FontSourceBase[]) fontSources.toArray(new FontSourceBase[fontSources.size()]);

        // Apply the new set of font sources to use.
        FontSettings fontSettings = new FontSettings();

        fontSettings.setFontsSources(updatedFontSources);
        for (PhysicalFontInfo fontInfo : (Iterable<PhysicalFontInfo>) updatedFontSources[0].getAvailableFonts())
        {
                 System.out.println("FontFamilyName : "+ fontInfo.getFontFamilyName());
                 System.out.println("FullFontName  : " + fontInfo.getFullFontName());
                 System.out.println("Version  : " + fontInfo.getVersion());
                 System.out.println("FilePath : " + fontInfo.getFilePath());
        }
        
        
        Document doc = new Document("/home/tahir/input docs/DEM-22-8.docx");
        doc.setFontSettings(fontSettings);

             
            doc.setWarningCallback(new com.aspose.words.IWarningCallback() {
            @Override
            public void warning(com.aspose.words.WarningInfo warningInfo) {
                if(warningInfo.getWarningType() == WarningType.FONT_SUBSTITUTION)
                    System.out.println(warningInfo.getDescription());
            }
            });
            
            doc.save("/home/tahir/input docs/19.12.pdf"); 

}

Hi @tahir.manzoor,
Thank you for the feedback.
I already tried exactly your suggestion, and the output is the same, I can’t use the Segoe UI Symbol on PDF.

Are you sure that this solution is working?
Kind regards,
Paulo Pereira

I have Segoe UI Symbol installed on Library/Fonts and on a personal folder, doesn’t work.

This is really important for us, and we have urgency to fix this.

Thank you.

@pamp

Please share the output generated by ‘System.out.println’ by using code example shared in my previous post. Moreover, please ZIP and attach the output PDF generated by the latest version of Aspose.Words for Java 20.1.

Moreover, please restart your system before testing this case. Thanks for your cooperation.

Hi @tahir.manzoor,
Thank you for the feedback.

Here are the arquive with the data requested.Archive.zip (34.4 KB)

Already updated to the Aspose words for java 20.1.
Thank you
kind regards,
Paulo

@pamp

The shared PDF file is generated by Aspose.Words 19.11 version. Please use the latest version of Aspose.Words for Java and apply the license before document conversion. You can get the 30 days temporary license from here:
Get a Temporary License

Hi @tahir.manzoor
Thank you for the feedback.

We have a valid Aspose license.

Here Archive.zip (27.2 KB) is an arquive with the code used the sys.out.println and the input and output documents.

This is not working yet.

Kind regards,
Paulo Pereira

@pamp

Thanks for sharing the detail. We are working over your query and will get back to you soon.

@pamp

We have tested the scenario at MAC operating system and have not found the shared issue. We copied all fonts from Windows operating system to MAC and used your code to test this case. The output is correct. Please check the attached image and output PDF.mac output.png (63.9 KB)
20.1.mac.pdf (6.6 KB)