Exporting pdf much larger than ppt file

I have a generated a ppt file using the slides packge several emf files. The result is relatively small and i am happy with the ppt output.

When I export it to pdf, the pdf is several time larger (5-10) than the ppt file. the emf files created from the cells
package.

why is the pdf so large in comparison?

test.zip (1.3 MB)

Hi Zoran,

I have worked with your presentation using Aspose.Slides for .NET 17.5 and following sample code.

Presentation pres = new Presentation(path + "TEST - EMF.pptx");
pres.Save(path+"TEST.pdf", SaveFormat.Pdf);

The generated PDF has normal size and quality is also not compromised. For your kind reference, I have attached the generated PDF as well.

TEST.pdf (94.2 KB)

Mudassir ,

if you compare the output of the pdf that you generate from the code

pres.Save(path+“TEST.pdf”, SaveFormat.Pdf)

and the pdf i attached (which was exported from ppt manually File->Export) you’ll notice that the resolutions are not the same. The emf images will be clean at each level as they are re-drawn. The raster image becomes pix-elated. I want to generate high resolution decks that are printable.

Zoom in to 400-800% on each pdf and compare the text on the images. I suspect that exporting from ppt embeds an emf file and saving as you instructed converts to some form of raster image.

I am looking at generating ppt with 100-400 slides which comes out to be 10-30mb ppt file. Using the export method on ppt generates a file that is 50-200mb in size.

I would like to know is it possible to save with the code you supplied to produce high quality pdfs (using emf) and the smaller size similar to the original ppt size.

regards,
Zoran

Hi Zoran,

The code that I have shared with you renders presentation to PDF using default DPI resolution settings. The default DPI for Aspose.Slides is 96. You can increase the quality of PDF by increasing the DPI. Setting SufficientResolution property will serve the purpose for you. You can try setting different resolution values that select the one that may suit your quality level.

Presentation pres = new Presentation(path + "TEST - EMF.pptx");
PdfOptions opts=new PdfOptions();
opts.SufficientResolution=192;//Twice resolution as compared to default
pres.Save(path+"TEST.pdf", SaveFormat.Pdf,opts);

Please note that increasing SufficientResolution value will increase PDF quality and will also directly affect the generated PDF size.

Many Thanks,

Mudassir Fayyaz

I have discovered a manual work around which seems to keep the pdf with embedded emf and looks like it compresses them somewhat. In powerpoint choose print and then select the adobe pdf as the printer.

How do I use print with the adobe-pdf printer? I want to disable to popup with the file name.

Presentation p = new Presentation(path + “TEST - EMF.pptx”);
var settings = new PrinterSettings()
{
PrinterName = “Adobe PDF”,
PrintFileName = destinationPDF,
};
settings.DefaultPageSettings.Landscape = true;
settings.DefaultPageSettings.Color = true;

            p.Print(settings);

Hi,

I suggest you to please visit this documentation section link for your kind reference to set different printing options including setting specific printer.

Many Thanks,

Mudassir Fayyaz