Aspose page convert ps to pdf failed

I'm using the Aspose.Page.Cpp 23.12 library for PostScript to PDF conversion. However, when I run the code, the generated PDF file has a size of 0. On the other hand, when I use Aspose's online conversion tool, the conversion is successful.  I would like to inquire about the usage of the Aspose library: 1. Do I need to purchase a commercial license before using the Aspose.Page.Cpp component? 2. Could there be an issue with my conversion code?

code:

BOOL PdfConvert::GeneratePdfFromPostScript(const std::wstring& post_script_path, const std::wstring& pdf_path)
        {
                System::String  pdf_path_string((const char16_t*)pdf_path.c_str(), pdf_path.length());
                System::String  ps_path_string((const char16_t*)post_script_path.c_str(),post_script_path.length());
                System::SharedPtr<System::IO::FileStream> pdfStream = System::MakeObject<System::IO::FileStream>(pdf_path_string, System::IO::FileMode::Create, System::IO::FileAccess::Write);
                
                System::SharedPtr<System::IO::FileStream> psStream = System::MakeObject<System::IO::FileStream>(ps_path_string, System::IO::FileMode::Open, System::IO::FileAccess::Read);
                System::SharedPtr<PsDocument> document = System::MakeObject<PsDocument>(psStream);

                // If you want to convert Postscript file despite of minor errors set this flag
                bool suppressErrors = true;
                //Initialize options object with necessary parameters.
                System::SharedPtr<PdfSaveOptions> options = System::MakeObject<PdfSaveOptions>(suppressErrors);

                // Default page size is 595x842 and it is not mandatory to set it in PdfDevice
                System::SharedPtr<Aspose::Page::EPS::Device::PdfDevice> device = System::MakeObject<Aspose::Page::EPS::Device::PdfDevice>(pdfStream);
                // But if you need to specify size and image format use following line
                //Aspose.Page.EPS.Device.PdfDevice device = new Aspose.Page.EPS.Device.PdfDevice(pdfStream, new System.Drawing.Size(595, 842));
                BOOL success = TRUE;
                
                auto __finally_guard_0 = ::System::MakeScopeGuard([&psStream, &pdfStream]()
                        {
                                psStream->Close();
                                pdfStream->Close();
                        });

                try{
                        document->Save(device, options);
                }
                catch (...)
                {
                        success = FALSE;
                }
                return TRUE;
        }

@yangjian.jianyang

You can please obtain a 30-days free temporary license from our website and use it to evaluate the API in its full capacity. In case you still notice issue, please share the sample PS document with us so that we can test the scenario in our environment and address it accordingly.

@asad.ali Thank you for your feedback, I followed your instructions to apply for a temporary license, but it prompted me to use a commercial/corporate account, which I don’t have. I would like to know where I can apply for this type of account

@yangjian.jianyang

For such requests, we recommend that you contact our Sales team by creating a topic in Purchase forum where you will be assisted accordingly.

hello @asad.ali I downloaded “aspose.page.cpp.24.1” from the Aspose official website and successfully set up the example project environment. I found that the example is able to convert the “input.ps” file to a PDF file correctly. However, when I rename my own PS format file to “input.ps” and place it in the correct directory, I noticed that the example fails to convert. However, I was able to successfully convert it using Ghostscript,my own input.ps was extrace from my own virtual postscript when start print job
input.7z (327.4 KB)

@yangjian.jianyang

Would you kindly also share the error you are noticing in your environment while converting your PS file into PDF? We will log an investigating ticket in our issue management system and share the ID with you.

@asad.ali Hello, I couldn’t find any relevant log files, but while debugging in Visual Studio’s debug mode, I noticed that the Output window of Visual Studio keeps displaying error messages. The error messages are referenced in the image below
image.png (466.8 KB)

@yangjian.jianyang

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PAGECPP-143

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@asad.ali Where can I find the progress information for this issue ID? We need to perform auditing on printers in our commercial product. If the Aspose SDK testing goes well, we will initiate the license procurement process. However, we are currently stuck in the SDK testing phase. Could you please help us prioritize this ticket?

@yangjian.jianyang

The ticket status can be checked at the bottom of this forum thread. On the other hand, we will keep you informed about ticket resolution progress. We have recorded your concerns and will surely consider them during ticket investigation. Please spare us some time.

We apologize for the inconvenience caused.

@yangjian.jianyang

We would like to share with you that the issue has been resolved and its fix will be included in 24.3 version of the API.