page.pdf (276.2 KB)
this pdf can not convert docx, pptx
env: .net 7 win11 vs2022 17.5 aspose.pdf 23.1
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(“xx.pdf”);
doc.Save(“1.pptx”);//no error, but can not be open by office 2021
doc.Save(“1.docx”);//no error, but can not be open by office 2021
doc.Save(“1.pptx”, new PptxSaveOptions());//throw System.NullReferenceException
@lsl,
I think it may be a problem in your local system.
I tried version 23.2 the following code and worked fine :
private void Logic()
{
Document doc = new Document($"{PartialPath}_input.pdf");
doc.Save($"{PartialPath}_output.pptx", SaveFormat.Pptx); // OK
doc.Save($"{PartialPath}_output.docx", SaveFormat.DocX); // OK
doc.Save($"{PartialPath}2_output.pptx", new PptxSaveOptions()); // OK
}
ConversionToWordError_input.pdf (276.2 KB)
ConversionToWordError_output.docx (64.4 KB)
ConversionToWordError_output_pptx.zip (77.8 KB)
I downlaod your convert result, it is ok,
but I test above code in another computer, convert result file
still can not open with office 2021
i make a video for you with generate filevideo.zip (6.7 MB) @carlos.molina
@lsl,
I tried that code in C# and Java and it works fine so I cannot replicate the issue.
I would reinstall the Aspose.PDF API, or try from another computer because there is something wrong with the particular PC.
Is not a code issue, and it is not a PDF issue. It is a machine problem. You need to troubleshoot that computer.