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

Free Support Forum - aspose.com

Set margin when convert Presentation to PDF

How to set margin when converting a Presentation to PDF. Code given below


Aspose.Slides.Presentation presentation = new Aspose.Slides.Presentation(“in.ppt”);
presentation.Save(“out.pdf”, Aspose.Slides.Export.SaveFormat.Pdf);

Hi Varun,


Thanks for inquiring Aspose.Slides.

I have observed the requirements shared by you and like to share that Aspose.Slides exports the presentation to PDF as it is in presentation. There is no additional option to set the margins for presentation. Also, even in PowerPoint as well, when you export to PDF, it gets exported as it is. The margin or indent settings can be applied to slide shapes contents independently.

Many Thanks,

ok Thanks,


Can we set size(like A3, A4, etc) and Quality(in DPI) in ouput PDF page?

Hi Varun,


I have observed the requirements shared and suggest you to please try using the following sample code on your end. You can see how to set the slide size and also the quality parameter of the PDF.

Aspose.Slides.Presentation presentation = new Aspose.Slides.Presentation(“in.ppt”);
presentation.SlideSize.Type = SlideSizeType.A4Paper;

PdfOptions opts = new PdfOptions();
opts.SufficientResolution = 112;

presentation.Save(“out.pdf”, Aspose.Slides.Export.SaveFormat.Pdf);


Please share, if I may help you further in this regard.

Many Thanks,

Hi,

PdfOptions opts = new PdfOptions();
opts.SufficientResolution = 112;

How use this code. It is not linked to anywhere.

Hi Varun,

I am sorry for the inconvenience. Please try using attached sample for your kind reference.

presentation.Save(“out.pdf”, Aspose.Slides.Export.SaveFormat.Pdf,opts);

Many Thanks,