c# excel转pdf提示 尚未安装打印机

代码如下:
bool result = false;
Excel.XlFixedFormatType targetType = Excel.XlFixedFormatType.xlTypePDF;
object missing = Type.Missing;
Excel.ApplicationClass application = null;
Excel.Workbook workBook = null;
try
{
application = new Excel.ApplicationClass();
object target = targetPath;
object type = targetType;
workBook = application.Workbooks.Open(sourcePath, missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing, missing, missing, missing, missing);

            workBook.ExportAsFixedFormat(targetType, target, Excel.XlFixedFormatQuality.xlQualityStandard, true, false, missing, missing, missing, missing);
            result = true;
        }
        catch
        {
            result = false;
        }
                    在我的电脑上是没有问题的,但是放在服务器上就一直提示 尚未安装打印机,有异常 ,报错,我觉得是服务器上哪里的设置没有设置好,用的office2010,哪位大神给支支招啊,先谢谢了

可以试试使用第三方Aspose 有破解版的

这种情况下,安装个Adobe Acrobat X Pro即可,上网查查下载即可