Free Support Forum - aspose.com

Convert Postscript to PDF does not convert entire document or hangs

Here is my code

  var input = "UCM21386988.ps";
        var outputFile = "UCM21386988.pdf";

        System.IO.FileStream pdfStream = new System.IO.FileStream(outputFile, System.IO.FileMode.Create, System.IO.FileAccess.Write);
  
        System.IO.FileStream psStream = new System.IO.FileStream(input, System.IO.FileMode.Open, System.IO.FileAccess.Read);
        PsDocument document = new PsDocument(psStream);

        Aspose.Page.EPS.Device.PdfDevice device = new Aspose.Page.EPS.Device.PdfDevice(pdfStream);
        Aspose.Page.SaveOptions options = new PdfSaveOptions();
        options.SupressErrors = true;

        try
        {
            document.Save(device, options);
        }
        finally
        {
            psStream.Close();
            pdfStream.Close();
        }


        foreach (var exception in options.Exceptions)
        {
            var ex = (PsConverterException) exception;
            Console.WriteLine(ex.Message);
        }

files.zip (3.0 MB)
UCM21019461.zip (5.0 MB)

@smooney1234

We were able to notice the issues with 3 of your files and logged them as following in our issue tracking system:

  • PAGENET-202 - (UCM21161714.ps -> one page output)
  • PAGENET-203 - (UCM21202390.ps -> code keeps running)
  • PAGENET-204 - (UCM21019461.ps -> code keeps running)

We will further look into details of above logged tickets and keep you posted with the status of their rectification. Please be patient and spare us some time.

We apologize for the inconvenience caused.

Thanks. Is the opposite conversion possible pdf to postscript?

@smooney1234

Regretfully, Aspose.Page does not support the opposite conversion as it is specialized to deal with PS and XPS documents.