AddFromPdf

AddFromPdf(string)

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

public ISlide[] AddFromPdf(string path)
ParameterTypeDescription
pathStringA path to the PDF document

Return Value

Added slides

Examples

Example:

[C#]
using (Presentation pres = new Presentation())
{
    pres.Slides.AddFromPdf("document.pdf");
    pres.Save("fromPdfDocument.pptx", SaveFormat.Pptx);
}

See Also


AddFromPdf(string, PdfImportOptions)

Creates slides from the PDF document and adds them to the end of the collection considering the pdf import options.

public ISlide[] AddFromPdf(string path, PdfImportOptions pdfImportOptions)
ParameterTypeDescription
pathStringA path to the PDF document
pdfImportOptionsPdfImportOptionsOptions for pdf import

Return Value

Added slides

Examples

Example:

[C#]
using (Presentation pres = new Presentation())
{
    pres.Slides.AddFromPdf("document.pdf, new PdfImportOptions { DetectTables = true });
    pres.Save("fromPdfDocument.pptx", SaveFormat.Pptx);
}

See Also


AddFromPdf(Stream)

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

public ISlide[] AddFromPdf(Stream pdfStream)
ParameterTypeDescription
pdfStreamStreamA stream which will be used as a source of the PDF document

Return Value

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


AddFromPdf(Stream, PdfImportOptions)

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

public ISlide[] AddFromPdf(Stream pdfStream, PdfImportOptions pdfImportOptions)
ParameterTypeDescription
pdfStreamStreamA stream which will be used as a source of the PDF document
pdfImportOptionsPdfImportOptionsOptions for pdf import

Return Value

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, new PdfImportOptions { DetectTables = true });
    }
    
    pres.Save("fromPdfDocument.pptx", SaveFormat.Pptx);
}

See Also