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

Free Support Forum - aspose.com

PPTX to PDF conversion is messing up bulletpoints

Dear Aspose-Support,
when converting e.g. following PPTX:

image.png (5.4 KB)

to a PDF file, the bullet points get all messed up:

image.png (61.6 KB)

this problem is reproducable on our productive environment (linux-server), however i cannot reproduce it ever on my local machine (windows).

I was suspecting a missing font might be the problem, so i tried to get all fonts used in a PPTX and then log a warning if the PPTX uses a font not installed on our servers but so far i’m not getting anything relevant logged either.

There’s not much to our pptx-to-pdf conversion code:

private ByteArrayContent generatePdfContent(Presentation presentation) {
    PdfOptions options = new PdfOptions();
    options.setSaveMetafilesAsPng(true);
    options.setTextCompression(PdfTextCompression.Flate);
    options.setCompliance(PdfCompliance.Pdf15);

    ByteArrayOutputStream pdfOutputStream = new ByteArrayOutputStream();
    presentation.save(pdfOutputStream, SaveFormat.Pdf, options);
    return new ByteArrayContent(pdfOutputStream.toByteArray(), "application/pdf");
}

while experimenting, i also added

options.setDefaultRegularFont(“Arial”);
options.setEmbedTrueTypeFontsForASCII(true);
options.setEmbedFullFonts(true);

that changed the bulletpoints, but they were still the wrong characters regardless:
image.png (8.8 KB)

I hope you can help me because i slowly dont know what to do anymore.
Thank you in advance! :slight_smile:

@chamcham123,

I have observed the issue shared by you and request you to please try using latest Aspose.Slides for Java 20.5 on your end. If there is still an issue then please share the source file and generated PDF along with working sample code and environment details with us. We will be able to investigate the issue further on our end on proviso

Dear @mudassir.fayyaz
I upgraded from Aspose.Slides 20.1 to 20.5 but the problem still persists.
I uploaded you a zip file with a PPTX file, the generated PDF, and the code that is responsible for generating PDFs out of the PPTX files (as much as i can share without getting into internal stuff)

bug.zip (530.5 KB)

Please note what i wrote in my last post:
I cannot reproduce it on my local windows machine.
However it is reproducable consistently on our clients linux machine.

Aspose seems to replace the bullet points with random icons, if you compare the example screenshot of my first post and the pdf in this archive you will see different icons. However they are always the wrong ones.

Thank you again for your help.

@chamcham123,

I have observed the PDF and presentation file shared by you. The issue you are facing is due to fonts missing on your Linux machine that have been used in your presentation. You need to either install the missing fonts or can even copy them to any public directory in Linux and access them externally in your application.

@mudassir.fayyaz,

thanks for the reply. I’m going to try that out and will report back.

Can you tell me how you noticed that? Is there an easy way to list all fonts used in a presentation? As i said in my original post i tried to log an error if there is a font missing but obviously i am doing something wrong.

@chamcham123,

I exported the presentation to PDF using MS PowerPoint and then in properties of PDF, I checked about used fonts.

@mudassir.fayyaz,
installing the mentioned fonts really seems to have solved the problem,
thank you for your help!

@chamcham123,

It’s good to know things are resolved on your end.