Hi,
I have a simple code where in I will open a pptx file and convert it to pdf.
Below is the code snippet.
if (pdftron.PDF.Convert.RequiresPrinter(inputPath))
{
if (pdftron.PDF.Convert.Printer.IsInstalled(“PDFTron PDFNet”))
{
pdftron.PDF.Convert.Printer.SetPrinterName(“PDFTron PDFNet”);
}
using (PDFDoc doc = new PDFDoc())
{
pdftron.PDF.Convert.ToPdf(doc, inputPath);
doc.Save(destinationPath, SDFDoc.SaveOptions.e_linearized);
outputPath = destinationPath;
}
}
And it returns an exception
Exception:
Message: An error occurred while converting the file.
Detailed error:
Error opening the presentation (presentation maybe invalid, corrupted, or password protected).
Code: DISP_E_EXCEPTION
COM Interop Error:
Code: 0
ARG Index: 0
File: “PowerPoint.cpp”:459
Log:
Start check system account.
Session ID is: 0.
Done checking system account.
Creating a PowerPoint application instance.
PowerPoint application instance created.
Application.AutomationSecurity ID obtained.
Application.AutomationSecurity value set to 3.
Application.DisplayAlerts ID obtained.
Application.Version ID obtained.
Application version: 16.
Application.Build ID obtained.
Application build: 4266.
Application.Presentations ID obtained.
Opening presentation “D:\simple_api\AssetsAuthModule\Assets\d9fd61d62c4640788470c6382fdc4668.pptx”.
Presentations.Open ID obtained.
The file is not password proctected and is valid.
Please let me know. Thank You