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

Free Support Forum - aspose.com

[.NET] Question regarding PDF export

Hi there,

I am quite new to Aspose Slides and I got a few questions regarding the pdf export. I want to print the presentation as pdf including the handnote settings for heading / footer / time / page numbers (not the general ones for the slides) but without the comments inside the notes area. I attached you an example I produced with Power Point itself using the following PDF options:

Publish as handout, one slide per page, do not include comments.

I already tried a bit with Aspose but was unable to reproduce such a pdf. I somehow don´t get rid of the comments / notes (what exactly is the correct expression for them?) neither disabling it in the ViewProperties

 Presentation.ViewProperties.ShowComments = NullableBool.False;

nor in the PDFOptions:

var option = new PdfOptions();
option.IncludeComments = false;

As the comments where included into the pdf, the slide was also rendered in a quite small size. Is there a proper way to archieve a similar output to the document I attached?

example.zip (551.0 KB)
(sadly I cannot provide the original pptx file from example.pdf as it is too large for some reasons so I created a example_new and rendered it, too.)

Is it also possible to set those data from the handout header/footer using aspose?

Kind regards,
Daniel

@Serraniel,

I suggest you to please try using following sample code on your end.

 Presentation pres = new Presentation(path + "example_new2.pptx");

PdfOptions po = new PdfOptions();
po.IncludeComments =true;
po.DrawSlidesFrame = false;

pres.Save(path + "example_new2.pdf", Aspose.Slides.Export.SaveFormat.PdfNotes,po);

I have also observed that when you set DrawSlidesFrame to false, it is still showing slide frame in PDF. An issue with ID SLIDESNET-39399 has been created in our issue tracking system to further investigate and resolve the issue. For your kind reference, I have attached the generated PDF as well.

example_new2.pdf (18.3 KB)

Hi,

thanks for the issue so far. The code is quite similar to the one I already tried out. I additionally don´t want the notes to be rendered. I assume the difference is the publishing mode as Power Point itself offers “handout” and “notes” each in the PDF render options:

So my target is to hide the Hi there from your example PDF output. Is this possible? I already tried with the Comments a bit but without success:

            var pres = new Presentation("example_new.pptx");

            pres.ViewProperties.ShowComments = NullableBool.False;

            var po = new PdfOptions();
            po.DrawSlidesFrame = false;
            po.IncludeComments = false;

            pres.Save("file_new.pdf", SaveFormat.PdfNotes, po);

@Serraniel,

I have observed your comments and like to share a new issue with ID SLIDESNET-39404 has been added to resolve the issue of slide comments getting visible in exported PDF when IncludeComments is set to false. This thread has been linked with the issue so that you may be automatically notified once the issue will be fixed.