Hi-
When converting a ppt to pdf we got the following error when the conversion takes place on a Linux server. Works fine on a Mac.
SEVERE: Error saving presentation pdf. com.aspose.slides.obfuscated.mr: java.lang.UnsupportedOperationException: Cannot find the required font. Name:“Dialog.bold”, Style:1, IsExactStyle:false.
Here’s my code (ppt attached):
// Saving the presentation to PDF document
// Instantiate the PdfOptions class
com.aspose.slides.export.PdfOptions pdfOptions = new com.aspose.slides.export.PdfOptions();
// Set Jpeg Quality
pdfOptions.setJpegQuality(60);
// Define behavior for metafiles
pdfOptions.setSaveMetafilesAsPng(true);
// Set Text Compression level
pdfOptions.setTextCompression(com.aspose.slides.export.PdfTextCompression.FLATE);
// Define the PDF standard
pdfOptions.setCompliance(com.aspose.slides.export.PdfCompliance.PDF_15);
File thingFolder = LC3Environment.getThingDirectory(thingID, domain);
out = new FileOutputStream(new File(thingFolder, thingFile.getName() + “.pdf”));
// Instantiate a Presentation object that represents a PPT file
if (thingFile.getName().toLowerCase().endsWith(“ppt”)) {
Presentation pptPresentation = new Presentation(in);
pptPresentation.save(out, com.aspose.slides.export.SaveFormat.PDF, pdfOptions);
} else {
PresentationEx pptxPresentation = new PresentationEx(in);
pptxPresentation.save(out, com.aspose.slides.export.SaveFormat.PDF, pdfOptions);
}
Hi Dave,
Hi -
The issue is we have no idea what fonts our users will have in the presentations. Is there a way to not have Slides throw an exception, but downgrade to another font?
Hi Dave,