Error in github sample code?


#1

Hi

I’m testing the convert functionality in Aspose.ASP using the sample code from https://github.com/aspose-eps/Aspose.EPS-for-.NET.

When running the PostScriptToPdf i get the following error:

License set successfully.
%%[Error: SyntaxError; Offending Command: --file (pipe) --]%%
Error Info: [ 7 (Illegal char 33 in HexStream) ]
Operand Stack (bottom…top)
[ ]
Execution Stack (bottom…top)
[ --file (pipe) – //SyntaxError ]
Dictionary Stack (bottom…top)
[ --dictionary (333)-- --dictionary (0)-- --dictionary (0)-- ]

A blank PDF is generated. I use the input.ps sample file from github.

I have tried another .ps file but that just gives a long list of errors
%%[ ProductName: Aspose.EPSShow Ignored 24

Running verion 18.11.0.


#2

@IMSDK

Thanks for contacting support.

We are sorry for the inconvenience faced. Please note that API has been tested with more than 500 sample PS/EPS files to generate PDF from them. The file included in GitHub project looks like got corrupted as we tested it using Adobe Distiller as well. Nevertheless, the file has now been replaced with a correct one and you may please test the API as per your convenience.

Furthermore, regarding the error shown in output, they were because of the following code snippet included in the example. When Suppress Errors option is specified as true, the API would suppress all the errors encountered during conversion process and generate the PDF output with showing those errors in console output.

    if (suppressErrors)
    {
      foreach (Ps2PdfConverterException ex in options.Exceptions)
      {
       Console.WriteLine(ex.Message);
      }
    }