Free Support Forum -

Can't load any PostScript files :-(


I’m looking into purchasing Aspose.PDF, but I’ve encountered serious problems while testing it for conversion of PostScript into PDF.

When I run the example code (Aspose.Pdf.Examples.CSharp.RunExamples) and call PostscriptToPDF.Run() AS IS, trying to get it to load the sample PostScript file that came with the examples, the Document constructor throws the exception:
Arithmetic operation resulted in an overflow.

When I try to run it inside my own code, loading another PostScript file, the Document constructor simply hangs. If I run it inside the main thread I get an exception after a minute:
The CLR has been unable to transition from COM context to COM context for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages.

If I run it in another thread, the operation simply hangs forever.

The code I’m using:

var options = new PsLoadOptions();
Document doc = null;
doc =
new Document(@“C:\Windows\temp\”, options);
catch (Exception ex)



Thanks for contacting support.

Would you please share your sample input file with us. We will test the scenario in our environment and address it accordingly.

Here is the source code: (88.5 KB)

And here is the postscript file (had to change its extension to “.zip” to get around your website limitations; please change the extension to “.ps”): (15.4 KB)


Thanks for sharing sample files.

We have tested the scenario using sample .ps file which has been shared in out GitHub Example Project and were unable to notice the issue. The file was successfully converted into PDF without raising any exception. output.pdf (2.0 KB)

However, when we tried to convert your .ps file into PDF, we have noticed that the program kept running without raising any exception. Hence, we have logged an issue as PDFNET-44892 in our issue tracking system. We will further investigate this issue and keep you informed with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

Thanks, Asad.
Is there a way to contact you directly and show you the problem on my system?
I am looking for a solution for PS -> PDF conversion and Aspose seems very suited to my needs. I would like to perform this purchase as fast as possible.


Thanks for sharing your feedback.

I am afraid that there is no other way to communicate over the issues which you are facing, as we encourage providing support through our support forums. Furthermore, you may please share your environment details e.g OS Version, Application Type, Target Framework, etc. We will again test the scenario and try to replicate the issue which you are facing.

Please also try to test the scenario with latest version of the API i.e. Aspose.PDF for .NET 18.6 and share the results with us.

Hey Asad,
Thanks for trying to push this forward.

I’m attaching a compiled version (Release configuration) that exhibits the same symptom. The file is there as well, in the same folder, and the program hangs when it tries to instantiate a new document from that file.

I also ran this in windbg, and when the program hit that line of code, I got a barrage of exceptions thrown at me, but I couldn’t investigate the problem because windbg isn’t really my forte. I therefore created a full dump at the moment when the exceptions started and included it in this archive as well, in a file called “dump”.

As per your questions: I am using the latest version of Aspose (18.6). The attached program is a console application that targets .Net 4.7, but I tried with 4.6.1 and 4.0 and got the same results. I’m running on Window 10 Pro (10.0.16299 build 16299). It’s a 32 bit app running on an x64 system, and it has 16GB of RAM.

The file I attached was apparently too big - I’m uploading it to Google Cloud now and will send the link in a few minutes.

Asad - the files are in a 7zip archive at
Thank you.


Thank you for sharing requested data and information.

We are investigating the scenario in our environment and will get back to you with our findings soon. In case we need any further information, we will request for it accordingly. Please be patient and spare us little time.


Thanks for sharing the sample project.

We tried to download the files from given link but we faced “403 Forbidden error” . Forbidden.png (3.1 KB)
Could you please upload the files over Dropbox and share the link with us.

Furthermore, please note that we were able to replicate the said error with the PS file which you had already shared with us. However, we were unable to notice the issue with PS file which is present in our GitHub repository as sample PS file. Before sharing the files through Dropbox, please make sure that your application can reproduce error with same input file, which is present in our GitHub example repository.

Hi Asad,

  1. Here is a link to the file in dropbox:

  2. I cannot reproduce the error with the file from your git repository… But the file I am using is a valid postscript file created by Microsoft Word. GhostScript can convert it without a problem. And even if the file was corrupt or invalid in some way, I’d expect Aspose.PDF to throw an exception, not just hang. Are you saying that because the file I’m using isn’t your exact file, then you can’t solve this problem?

  3. I managed to narrow the problem down to a specific Resource in the Prolog section of my PostScript file. If I remove this resource, Aspose.PDF can open the file without a problem. This is of course not a real solution… But here is the problematic part:

%%BeginResource: file Pscript_WinNT_ErrorHandler 5.0 0
/currentpacking where{pop/oldpack currentpacking def/setpacking where{pop false
setpacking}if}if/$brkpage 64 dict def $brkpage begin/prnt{dup type/stringtype
ne{=string cvs}if dup length 6 mul/tx exch def/ty 10 def currentpoint/toy exch
def/tox exch def 1 setgray newpath tox toy 2 sub moveto 0 ty rlineto tx 0
rlineto 0 ty neg rlineto closepath fill tox toy moveto 0 setgray show}bind def
/nl{currentpoint exch pop lmargin exch moveto 0 -10 rmoveto}def/=={/cp 0 def
typeprint nl}def/typeprint{dup type exec}readonly def/lmargin 72 def/rmargin 72
def/tprint{dup length cp add rmargin gt{nl/cp 0 def}if dup length cp add/cp
exch def prnt}readonly def/cvsprint{=string cvs tprint( )tprint}readonly def
/integertype{cvsprint}readonly def/realtype{cvsprint}readonly def/booleantype
{cvsprint}readonly def/operatortype{(–)tprint =string cvs tprint(-- )tprint}
readonly def/marktype{pop(-mark- )tprint}readonly def/dicttype{pop
(-dictionary- )tprint}readonly def/nulltype{pop(-null- )tprint}readonly def
/filetype{pop(-filestream- )tprint}readonly def/savetype{pop(-savelevel- )
tprint}readonly def/fonttype{pop(-fontid- )tprint}readonly def/nametype{dup
xcheck not{(/)tprint}if cvsprint}readonly def/stringtype{dup rcheck{(()tprint
tprint())tprint}{pop(-string- )tprint}ifelse}readonly def/arraytype{dup rcheck
{dup xcheck{({)tprint{typeprint}forall(})tprint}{([)tprint{typeprint}forall(])
tprint}ifelse}{pop(-array- )tprint}ifelse}readonly def/packedarraytype{dup
rcheck{dup xcheck{({)tprint{typeprint}forall(})tprint}{([)tprint{typeprint}
forall(])tprint}ifelse}{pop(-packedarray- )tprint}ifelse}readonly def/courier
/Courier findfont 10 scalefont def end errordict/handleerror{systemdict begin
$error begin $brkpage begin newerror{/newerror false store vmstatus pop pop 0
ne{grestoreall}if errorname(VMerror)ne{showpage}if initgraphics courier setfont
lmargin 720 moveto errorname(VMerror)eq{userdict/ehsave known{clear userdict
/ehsave get restore 2 vmreclaim}if vmstatus exch pop exch pop PrtVMMsg}{
(ERROR: )prnt errorname prnt nl(OFFENDING COMMAND: )prnt/command load prnt
$error/ostack known{nl nl(STACK:)prnt nl nl $error/ostack get aload length{==}
repeat}if}ifelse systemdict/showpage get exec(%%[ Error: )print errorname
=print(; OffendingCommand: )print/command load =print( ]%%)= flush}if end end
end}dup 0 systemdict put dup 4 $brkpage put bind readonly put/currentpacking
where{pop/setpacking where{pop oldpack setpacking}if}if


Thanks for sharing more details.

We apologize if any of our previous replies caused this confusion. We already were able to reproduce the error with your PS file and have logged the issue for correction as PDFNET-44892 in our issue tracking system. We will definitely investigate the issue that API is generating and let you know once we fix this.

Thanks for sharing these details, as these will definitely be helpful during investigation. We have also logged these details along with the issue. As soon as we make any significant progress towards resolution of the issue, we will let you know.

Meanwhile, we will also test the scenario while running the release which you have shared and address the issue as well, if found any.

We are sorry for the confusion and inconvenience caused.

Oh, OK! I apologize, I misunderstood.
I’m glad you’re working on this. Do you have an error log that I can track to see when the problem is resolved?


Thanks for your inquiry.

As the issue is logged under free support model, so I am afraid that you will not have access to ticket status. However, we will keep you posted with the status of ticket resolution in this forum thread. Furthermore, the logged issue will be investigated on first come first serve basis due to low priority. We also offer paid support model to our customers, where issues have high priority and are resolved on urgent basis. Additionally you can also check the ticket status in paid support model.

Asad - I appreciate your help, but you do understand that I’m a potential customer eager to spend $3000 on your product, and I can’t get it to work…


Thanks for sharing your concerns.

We have recorded your concerns and will definitely consider them while investigating the issue. We will further try to escalate the things regarding investigation of the issue and will surely inform you in case of any progress. Please spare us little time.

We are sorry for the inconvenience.

It’s been almost a month. Are there any news?


Thanks for your inquiry.

We are pleased to share with you that your issue has been resolved and its fix will be included in Aspose.PDF for .NET 18.8, which will be released in next month. We will surely inform you further, when this version of the API is released.

Wonderful. Thank you very much.