简体   繁体   中英

convert excel to pdf in BCL Easy PDF SDK 8

We are using bcl easy pdf sdk 8 to convert files. Except excel and html all other files I could convert. I am getting error as "error converting to pdf, failed to create a pdf rendition". Do any of them have experienced in this Easy PDF software. 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#):

Excel to 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

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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