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

Free Support Forum - aspose.com

Convert to PDF to PS without using printer settings

Hi Aspose.PDF Team
We use Aspose.PDF product for pdf operations in our project. We need to convert pdf file to post script file using Aspose.PDF, but it require to add printer settings. Is there any other option without adding printer settings ?
Below is the code we used to convert pdf file to PS.

Aspose.Pdf.Facades.PdfViewer viewer = new Aspose.Pdf.Facades.PdfViewer();
viewer.BindPdf(@“C:\pdftest\sample1\input.pdf”);
//Set PrinterSettings and PageSettings
System.Drawing.Printing.PrinterSettings printerSetttings = new System.Drawing.Printing.PrinterSettings();
printerSetttings.Copies = 1;
//Set PS printer, one can find this driver in the list of preinstalled printer drivers in Windows
printerSetttings.PrinterName = “Printer Name”;
//Set output file name and PrintToFile attribute
printerSetttings.PrintFileName = @“C:\pdftest\sample1\output.ps”;
printerSetttings.PrintToFile = true;
// Optimize the size of output ps file
viewer.UseIntermidiateImage = true;
//Disable print page dialog
viewer.PrintPageDialog = false;
//Pass printer settings object to the method
viewer.PrintDocumentWithSettings(printerSetttings);
viewer.Close();

@sreeraj_05

We are afraid that there is no alternate way except using a printer that support PS export. Please feel free to let us know if you need more information.