Hello,
In my ASP .Net application, I am using 'PDFTron 6.0.1.0'.
Prior converting my docx files to xod(using pdftron.PDF.Convert.ToXod method), we are checking the presence of virtual printer, and install it if not present. For this we are using following code:
-----------------------------
private void CheckIfVirtualPrinterRequired(string inputFilePath, out bool uninstallVirtualPrinter)
{
uninstallVirtualPrinter = false;
if (pdftron.PDF.Convert.RequiresPrinter(inputFilePath))
{
if (pdftron.PDF.Convert.Printer.IsInstalled("PDFTron Creator"))
{
pdftron.PDF.Convert.Printer.SetPrinterName("PDFTron Creator");
}
else if (!pdftron.PDF.Convert.Printer.IsInstalled())
{
pdftron.PDF.Convert.Printer.Install();
uninstallVirtualPrinter = true;
}
}
}
-----------------------------
However, at 'pdftron.PDF.Convert.Printer.Install();' code, I am getting SEHException:
External component has thrown an exception.
Stack Trace:
at trn.PDF.Convert.Printer.Install(UString* )
at pdftron.PDF.Convert.Printer.Install()
at *****.PDFTronService.CheckIfVirtualPrinterRequired(String inputFilePath, Boolean& uninstallVirtualPrinter) in c:\***\PDFTronService.cs:line 126
I have tried after manually installing 64-bit versions of 'PDFTron Creator' and 'PDFTron PDFNet' printers, but the conversion still fails with error:
Unable to convert file, too many attempts.
Conditional expression: false, Filename : Convert.cpp, Function : trn::PDF::Convert::ToPdf, Linenumber : 1742 at pdftron.PDF.Convert.ToXod(inputFilePath, outFileName);
Please help with this issue.
Regards,
Shubham