Thanks for the quick reply @amjad.sahi ! I have been successful doing the same thing with word files so it is really puzzling why aspose.Slides will simply not work for me.
I am able to view the object successfully in memory as it loads the right amount of images, and slides, and text, but corrupts when I saved it to PDF. Here is what I see when I try to edit it with notepad++
I tested your scenario/case using some newer version (e.g., Aspose.Slides for Java v23.10) and it works fine. I used the following sample code with your file to convert to PDF, the output PDF(attached) is fine tuned:
e.g. Sample code:
com.aspose.slides.Presentation presentation = new com.aspose.slides.Presentation("f:\\files\\linalg.ppt");
presentation.save("f:\\files\\out1.pdf", com.aspose.slides.SaveFormat.Pdf);
Previously I tested with Aspose.Slides for Java v23.10 as I thought you are using Java library. Now I found you are using Asposes.Slides for Python via .NET v23.12. So, I now tested using your sample presentation file after installing Asposes.Slides for Python via .NET v23.12 and following sample code:
e.g. Sample code:
import aspose.slides as slides
# Opening the presentation file by passing the file path to the constructor of Presentation class
pres = slides.Presentation("linalg.ppt")
pres.save("linalg.pdf", slides.export.SaveFormat.PDF)
it again works absolutely fine on my end, the output PDF is fine tuned and is not corrupted. Please find attached the output PDF file for your reference. linalg.pdf (2.0 MB)
What is your environment (python version, OS, etc.), give us complete details? I am using python 3.11 on Window10.
I followed what you were doing Amjad, and ran it in my Windows 10/Python 3.10.0 and every works great. There might be some weird issue going on with Aspose and Ubuntu…
Please find the pdf file here: linalg.zip (1.2 MB)
I know that I can remove the water mark but initializing the license. I have been doing this fine with aspose.word for word docs in the same ubuntu environment which makes it really odd.
That output is fine because I was running it out of my WSL environment in Windows 10 with Python version 3.10.0. I get this file when I do it within WSL environment with Python version 3.10.0 and Ubuntu release 20.04. linalg.pdf (17 Bytes)
@ch.usai,
Unfortunately, I was unable to reproduce the problem. It looks like the issue is not related to Aspose.Slides for Python. Please try to isolate the problem and share additional information on how to reproduce the problem.