ISlideCollectionAddFromPdf Method (Stream)

Creates slides from the PDF document and adds them to the end of the collection.

Namespace:  Aspose.Slides
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 21.11.0.0 (21.11)
Syntax
ISlide[] AddFromPdf(
	Stream pdfStream
)

Parameters

pdfStream
Type: System.IOStream
A stream which will be used as a source of the PDF document

Return Value

Type: ISlide
Added slides
Examples
Example:
[C#]
using (Presentation pres = new Presentation())
{
    using (Stream stream = new FileStream("document.pdf", FileMode.Open, FileAccess.Read, FileShare.Read))
    {
        pres.Slides.AddFromPdf(stream);
    }

    pres.Save("fromPdfDocument.pptx", SaveFormat.Pptx);
}
See Also