Different File Sizes after Converting PPTX to PDF Locally in Java and via the Cloud

I have a PPT file that needs to be converted to PDF and some of the content needs to be recombined into a new file, but I found that there seems to be an issue with the size of the converted file. I have tested the API cloud Aspose.Slides Cloud - API References Are there any parameters that need to be optimized for creating the specified page content using the converted file and the file I converted using the official demo locally?

These are two files obtained through online conversion and local conversion using the same PPT file

The suffix pptx.pdf is the file converted online

The suffix default.pdf is the locally converted file
44a2503ca0cedc8295c6977377ca31f8_ppt.zip (6.8 MB)

44a2503ca0cedc8295c6977377ca31f8.pptx.pdf (6.8 MB)

44a2503ca0cedc8295c6977377ca31f8_default.pdf (7.3 MB)

demo1.png (4.6 KB)

demo2.png (7.0 KB)

demo3.png (18.5 KB)

Version used for testing

Aspose slides version 21.10
Aspose slides version 23.10

Is there a problem somewhere? thanks

What I expect is that the file size for exporting 1-3 pages of content is not the same as the file size for exporting 1-1 pages, but in reality, the file size for exporting 1-3 pages is not significantly different from the file size for exporting 1-1 pages after local conversion

Thank you for contacting support.

Please note that you compare the conversion results from different versions of Aspose.Slides (23.9 in the Cloud and 21.10 locally). There have been many updates since version 21.10, so results may vary greatly.

The file size depends more on the content of the slides than on the number of slides. For example, images increase file sizes significantly.

Okay, thank you. It’s really a version issue

Thank you for using Aspose.Slides.

Hello, it may still be the same issue as last time. I have a 30 page PowerPoint presentation Aspose.Slides Cloud - API References After conversion, generate a PDF file. Then I use Acrobat to split the pages, one file per page
demo_pdf.zip (6.7 MB)

demo5.jpg (87.7 KB)

The problem I encountered is that the file size is getting larger and larger, and the file displayed at the back of the page number is getting larger. I am not sure what the problem is. I tried using Acrobat to optimize the file on page 30, and it can be seen that the optimized file is about 500kb. Which part is the problem? I used the new PdfFileEditor extract to cut and produce the same problem The effect I want to achieve is to cut out a page range and generate a new file. Only the source file page content and actual page size are retained


I am not sure I understand the problem you are facing. Please describe in detail step by step how to reproduce the problem on our end.

Of course, after converting this PPT to PDF and optimizing the image quality, I used PdfFileEditor to split each page. As you can see on page 30, the file size on this page is about the same as the source file. I would like to know what problem occurred inside

ssss_99_40.zip (3.0 MB)
demo5.png (9.7 KB)

String sourceFile = "D:\\www\\aspose\\pj\\mass\\ssss_99_40.pdf";
PdfFileEditor pdfEditor = new PdfFileEditor();
int[] pagesToExtract = new int[] { 1, 30 };
for (int i = 1; i <= 30; i++){
    String targetFile = "D:\\www\\aspose\\pj\\mass\\ssss_99_40_-"+i+".pdf";
    pdfEditor.extract(sourceFile, new int[] { i }, targetFile);

The effect I want to achieve is that each page size should be the actual size of the current page, rather than containing some other unused information, such as unused file streams or unused fonts. Perhaps I need to perform optimization com.aspose.pdf.optimization.OptimizationOptions again after page splitting

It looks like the issue is related to Aspose.PDF for Java. I’ve moved this forum thread to Aspose.Total forum. My colleagues from Aspose.PDF team will assist you shortly.