We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert PS/EPS/PRN file to PDF via Aspose.Page for .NET - Print PRN File to PDF

Hi Folks,
Hoping someone can help. On the latest Java Aspose.Pages 19.7 I’m trying to load a Postscript PRN file created with a Print to File driver on Windows 10 and save as a PDF. I have tried the PRN file produced as well as several example PS and EPS files all with the same result, that is a blank PDF file is created (or with the PS or EPS a null pointer occurs at Save in the Aspose API).
The code I am executing is:
FileInputStream psStream = new FileInputStream(“C:/Talend/DataFiles/MS101.prn” );
PsDocument psDoc = new PsDocument( psStream );
FileOutputStream pdfstream = new FileOutputStream(extPath + “MS101.pdf” );
com.aspose.eps.device.PdfDevice device = new com.aspose.eps.device.PdfDevice( pdfstream );
try {
psDoc.save( device, new com.aspose.eps.device.PdfSaveOptions( true ) );
} finally {

I know the PRN and PS files are ok as they can be read by the printer and by the free online file conversion utilities.

Anyone have any ideas?

(p.s. I’ve also tried using Aspose.PDF to read the files using PsLoadOptions and have the same problem)



Thanks for contacting support.

Would you please share your sample PS/EPS files with us. We will test the scenario in our environment and address it accordingly.