PostScript to PDF conversion hangs or produces a blanks document

I’m working on a C# project and there are certain postscript files which cause the conversion to hang (never complete) or produce blank documents. I’m following the steps shown here to perform conversion: Postscript (.PS) to PDF conversion - #5 by imran.rafique. I know these files are valid postscript because I can convert them with other utilities. Here’s a bare bones repro case:

using System;
using System.IO;
using System.Linq;
using Aspose.Pdf;

namespace postscript_converter
{
    class Program
    {
        static void Main(string[] args)
        {
            var noArgs = !args?.Any() ?? true;
            if (noArgs) return;

            var license = new License();
            license.SetLicense("Aspose.Total.lic");

            var options = new PsLoadOptions
            {
                WarningHandler = new WarningHandler()
            };

            var fileName = args[0];
            var document = new Document(fileName, options);
            document.Save(Path.ChangeExtension(fileName, ".pdf"));
        }
    }

    public class WarningHandler : IWarningCallback
    {
        public ReturnAction Warning(WarningInfo warning)
        {
            Console.WriteLine($"WARNING: {warning.WarningMessage}");
            return ReturnAction.Continue;
        }
    }
}

Attached is the expected outcome. I have taken this pdf and printed it using different drivers to produce postscript files. The postscript files are attached in the zip file and demonstrate the issues I’m experiencing. test1.ps produces a blank pdf, test2.ps just hangs.

expected.pdf (356.2 KB)
postscript-files.zip (230.0 KB)

@doug.ludlow

Thank you for contacting support.

We have worked with the data shared by you and have been able to reproduce the issue in our environment. A ticket with ID PDFNET-44852 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

However, we have noticed test1.ps to hang and test2.ps producing blank output in our environment. Can you please verify the same, for our reference.

We are sorry for the inconvenience.

@Farhan.Raza whoops, that is correct. test1.ps hangs and test2.ps produces a blank.

Are there any status updates or ETA for PDFNET-44852?

@doug.ludlow

Thank you for clarifying it.

We would like to share with you that the issue reported by you, PDFNET-44852, has been logged about a week ago and is pending for investigations owing to previously logged tickets. It will be investigated on its due turn which can take a few months. We appreciate your patience and comprehension in this regard.

However, we also offer Paid Support, where issues are used to be investigated with higher priority. Our customers, who have paid support subscription, report their issue there which are meant to be investigated urgently. In case your reported issue is a blocker, you may please consider subscribing for Paid Support. For further information, please visit Paid Support FAQs.

I am experiencing the same issue, and we just bought a license with one year support.

Edit: I should clarify that I am actually experiencing the same issue but using the Java libraries.

@mlundela

Thank you for contacting support.

Kindly create a separate topic over Aspose.PDF forum while sharing source and generated file along with narrowed down code snippet so that we may try to reproduce and investigate it in our environment. Before sharing requested data, please ensure using Aspose.PDF for Java 18.5 in your environment.

Related issue: Can't load any PostScript files :-(

@doug.ludlow

Thank you for getting back to us.

Please note that the issues may appear same but the reasons could be different. The thread you are referring to was created for Exception thrown while loading a PS file. Whereas, your ticket has been logged for blank output and system hang. Since the issues are file specific and may not necessarily be same. However, we have recorded your concerns under respective ticket and will consider them while investigating your ticket. We appreciate your patience and comprehension in this regard.