When I try to convert a pptx that has text with emoji it doesn’t work.
Attached input pptx and result pdf
This text is the one that is included in the pptx.
Instagram se actualiza con cambios constantes. Y ahora, ¿qué funciona?
Lo sabes porque te lo con…
conversion result
bugEmoji.pdf (29,3 KB)
@martindelacruz
To convert a PowerPoint presentation (PPTX) that includes emojis to a PDF using Aspose.Slides for Java, you can follow these steps:
-
Prepare Your Environment: Ensure you have the Aspose.Slides library added to your Java project.
-
Load the Presentation: Use the Aspose.Slides API to load your PPTX file that contains the emojis.
-
Save as PDF: After loading the presentation, you can save it as a PDF file. The Aspose.Slides library supports rendering a wide range of emojis, including standard Unicode emojis, ensuring they appear correctly in the output PDF.
Here is a sample code snippet to demonstrate the process:
import com.aspose.slides.*;
public class ConvertPPTXToPDF {
public static void main(String[] args) {
// Set the path to the presentation file
String dataDir = "path/to/your/presentation.pptx";
String outputPdfPath = "path/to/output/presentation.pdf";
// Load the presentation
Presentation presentation = new Presentation(dataDir);
// Save the presentation as PDF
presentation.save(outputPdfPath, SaveFormat.Pdf);
System.out.println("Presentation converted to PDF successfully.");
}
}
Important Notes:
- Ensure that the emojis are supported by the Aspose.Slides library, which can handle a variety of emoji types.
- The output PDF should closely resemble the original presentation, including the emojis.
If you encounter any issues with specific emojis not rendering correctly, it may be worth checking the compatibility of those emojis with the Aspose.Slides library.
For more detailed information on rendering emojis and converting presentations to PDF, you can refer to the official documentation on rendering emojis in PowerPoint and the PDF conversion process.
Sources:
[1]: Render Emojis in PowerPoint | Aspose.Slides Java PowerPoint Processing API
[2]: Portable Document Format (PDF)|Aspose.Slides Documentation
I have done exactly what is stated in the code but it doesn’t work
@martindelacruz,
We are sorry that you encountered this problem. Could you please share the presentation file you used? You can zip the file and upload an archive here.
EmojiBug.zip (53,4 KB)
attached pptx input and pdf result.
My operating system is windows
@martindelacruz,
Thank you for the sample PowerPoint presentation. Could you please also indicate which version of Aspose.Slides you used?
spose-slides 24.9
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-slides</artifactId>
<version>24.9</version>
<classifier>jdk16</classifier>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-slides</artifactId>
<version>24.9</version>
<classifier>javadoc</classifier>
</dependency>
@martindelacruz,
Thank you for the details. I’ve reproduced the problem with missing emiji and text when converting the PowerPoint presentation to a PDF document. Unfortunately, using Aspose.Slides 25.1 does not solve the issue yet (an error occurs). We apologize for any inconvenience caused.
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): SLIDESJAVA-39624
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.
Hi Andrey,
If it helps, when we run the same code on a Mac, the emojis are not displayed, but the conversion is completed. On Windows, the conversion is truncated.
@marcoscacabelos,
Thank you for the additional information. I’ve forwarded it to our developers.
Hi, we have also test the conversion in aspose.cloud and it works. Emojis are not displayed but conversion is finished without truncated.
I’m attached a new sample, with the pdf downloaded from aspose cloud.
table_with_emoji.pptx.pdf (65,4 KB)
table_with_emoji.pptx.zip (1,6 MB)
@marcoscacabelos,
Thank you for the sample presentation. I’ve added it to the issue ticket.
@martindelacruz, @marcoscacabelos,
Our developers have investigated the case. The problem with displaying symbols is caused by the absence of the Segoe UI Emoji font. There is currently no replacement for this font on macOS or Linux. To resolve the issue, use FontsLoader with the Segoe UI Emoji font.
FontsLoader.loadExternalFonts(new String[]{"path_to_the_font_folder"});
Custom PowerPoint Font in Java|Aspose.Slides Documentation