简体   繁体   English

在BCL Easy PDF SDK 8中将excel转换为pdf

[英]convert excel to pdf in BCL Easy PDF SDK 8

We are using bcl easy pdf sdk 8 to convert files. 我们正在使用bcl easy pdf sdk 8转换文件。 Except excel and html all other files I could convert. 除了excel和html我可以转换的所有其他文件。 I am getting error as "error converting to pdf, failed to create a pdf rendition". 我收到错误提示,因为“转换为pdf时出错,无法创建pdf格式副本”。 Do any of them have experienced in this Easy PDF software. 他们中的任何一个在此Easy PDF软件中都有经验吗? Please help me on this. 请帮我。

Regards, sudha 问候,苏达

I think you are using a not right method of conversion. 我认为您使用的是不正确的转换方法。

Please see the code below for easy PDF SDK (C#): 请查看以下代码,以获取简单的PDF SDK (C#):

Excel to PDF Excel转PDF

using BCL.easyPDF.Printer;

namespace TestPrinter
{
   class Program
   {
      static void Main(string[] args)
      {
         if(args.Length != 2)
            return;

         string inputFileName = args[0];
         string outputFileName = args[1];
         Printer printer = new Printer();
         try
         {
            ExcelPrintJob printjob = printer.ExcelPrintJob;
            printjob.PrintOut(inputFileName, outputFileName);
         }
         catch(PrinterException ex)
         {
            System.Console.WriteLine(ex.Message);
         }
         finally
         {
            printer.Dispose();
         }
      }
   }
}

HTML to PDF HTML转PDF

using BCL.easyPDF.Printer;

namespace TestPrinter
{
   class Program
   {
      static void Main(string[] args)
      {
         if(args.Length != 2)
            return;

         string inputFileName = args[0];
         string outputFileName = args[1];
         Printer printer = new Printer();
         try
         {
            IEPrintJob printjob = printer.IEPrintJob;
            printjob.PrintOut(inputFileName, outputFileName);
         }
         catch(PrinterException ex)
         {
            System.Console.WriteLine(ex.Message);
         }
         finally
         {
            printer.Dispose();
         }
      }
   }
}

Why don't you just contact their support team for an assistant? 您为什么不直接与他们的支持团队联系以获得助理?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM