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

Free Support Forum - aspose.com

Conversion of Word Document into PPTX via an Intermediate PDF Conversion

Hi,

I have a requirement on DOCX to PPTX conversion.
I’ve installed Aspose.Total with a temporary license & working on .NET framework.

My approach: DOCX to PDF conversion with landscape orientation. This works fine. But now when I try converting this PDF to PPTX, the final PPT file looks good yet not friendly enough for editing.

This is because I can see each sentence or each line in the converted PPT is rendered as individual text box.

Can you please tell me if the final PPTX can be made more friendly to edit by any means?

Here’s some information that you might need:

  • OS version on which the code was executed: Windows 10
  • .NET target platform in the app: Am currently trying this on .NET Framework 4.7.2 & we might want this to work on .NET Core 3.1 & higher versions too.
  • Aspose.Slides and Aspose.Words versions I used: I used Aspose.Total (Aspose.Slides: 23.1.0.0 & Aspose.Words: 22.12.0.0)

Thanks,
Nivedhitha

@niverajkumar,
Thank you for describing the issue.

Please share the following files in information:

  • input Word document
  • intermediate PDF document
  • final PPTX document
  • the simplest code example that reproduces the problem

The structure of the final document depends on the structure of the input documents. We need the files mentioned above.

@andrey.potapov Hi,

I’ve attached the 3 files that you’ve asked for: Single page Example.zip (155.5 KB)
& Here’s the sample code that I use for this conversion:

public static void PdfToPresentationConverter()
{
    var license = new License();
    using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("ConsoleApp2.Aspose.Total.NET.lic"))
    {
        license.SetLicense(stream);
    }

    string filename = "Single page Example";

    Aspose.Words.Document doc = new Aspose.Words.Document(filename + ".docx");
    foreach (Aspose.Words.Section sec in doc.Sections)
    {
        sec.PageSetup.Orientation = Aspose.Words.Orientation.Landscape;
    }
    doc.Save(filename + ".pdf");


    Stream pdfStream = new FileStream(filename + ".pdf", FileMode.Open, FileAccess.ReadWrite);

    Presentation pres = new Presentation();
    pres.Slides.AddFromPdf(pdfStream);
    if (pres.Slides.Count > 1)
    {
        pres.Slides.RemoveAt(0);
    }

    pres.Save(filename + ".pptx", SaveFormat.Pptx);

}

Thanks,
Nivedhitha

@niverajkumar,
Thank you for the code example and files. Could you please describe the expected result in more detail for the case?

@andrey.potapov
Hi, The result is expected to have the text content friendly to edit (.i.e to support bullets, numbering, etc when a sentence is being added or removed, etc.)

I’ve attached a PPT slide which was directly created with MS Powerpoint for your reference. Single Page Expected Output.zip (120.6 KB)

So in short, we expect the converted final PPT from Aspose to have the editing capabilities of a normal PPT created using MS Powerpoint.

Thanks,
Nivedhitha

@niverajkumar,
I reproduced the problem with creating individual text boxes when adding the PDF document to PowerPoint presentation.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-43871

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.