Hi-
I am trying to use the COM interface on windows 2008 server 64 bit, with the following code snippet in c# to start the pdf conversion:
private bool performConversion(int FileTyp, String filePath)
{
fname, DefaultPrinter;
FileInfo fi;
PDFCreator.clsPDFCreatorOptions opt;
bool bRet = false;
try
{
fi = new FileInfo(filePath);
if (fi.Name.Length > 0)
{
if (fi.Name.IndexOf(".") > 1)
{
fname = fi.Name.Substring(0, fi.Name.IndexOf("."));
}
else
{
fname = fi.Name;
}
if (!_PDFCreator.cIsPrintable(fi.FullName))
{
MessageSpan.InnerHtml = @“File '” + fi.FullName + @"’ cannot be converted to PDF!";
return bRet;
}
// Set the conversion options
opt = _PDFCreator.cOptions;
opt.UseAutosave = 1;
opt.UseAutosaveDirectory = 1;
opt.AutosaveDirectory = fi.DirectoryName;
opt.AutosaveFormat = FileTyp;
opt.AutosaveFilename = fname;
_PDFCreator.cOptions = opt;
_PDFCreator.cClearCache();
DefaultPrinter = _PDFCreator.cDefaultPrinter;
_PDFCreator.cDefaultPrinter = “PDFCreator”;
_PDFCreator.cPrintFile(fi.FullName);
_readyState = false;
_PDFCreator.cPrinterStop = false;
The code just hangs on the call to
_PDFCreator.cPrintFile(fi.FullName);
It never returns, and the process hangs. I am running the code as full administrator on the server, so I don’t understand what could be the issue. Is there anything I can do to debug this further?
Thanks-
Joe