I convert a VSDX file to PDF and the Calibri font replaced although it exit (in Linux) aspose diagram version 23.6

the code-
String dataDir = Utils.getDataDir();

	// Load VSD file
	Diagram visio = new Diagram(dataDir + fileId + "." + extension);
	visio.setFontDirs(new String[] {FONTS_PATH});
	System.out.println(FONTS_PATH);
	WarningCallbackVisio callback = new WarningCallbackVisio();	
	com.aspose.diagram.PdfSaveOptions options = new com.aspose.diagram.PdfSaveOptions();
	options.setSaveFormat(com.aspose.diagram.SaveFileFormat.PDF);
	options.setWarningCallback(callback);
	visio.save(dataDir + fileId.split("\\.")[0] + ".pdf",options);

image.png (50.7 KB)

the font path is /webapp/fonts - and I upload my font to this foldertf16403437 (6) (1).zip (37.6 KB)

@operationsdotbcs
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMNET-53164

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@operationsdotbcs
Please try to place all the font files including “CALIBRI.TTF CALIBRIB.TTF CALIBRII.TTF CALIBRIL.TTF CALIBRILI.TTF CALIBRIZ.TTF” in a separate directory.

We were able to obtain the correct PDF file without any warnings on Linux. You can review the PDF file generated on Linux in the attached document, where the font used is Calibri.
.out.pdf (37.8 KB)

Please try this sample code to set font config before loading instead of visio.setFontDirs.
com.aspose.diagram.FontConfigs.setFontFolder(FONTS_PATH, false);
Thanks.

1 Like