Improvement: loading PDF in black & white


In order to speed up the rasterization process and reduce output file sizes for customers who are not interested in preserving colors of PDF input files, our product offers the possibility to “load” them in black and white.

Using ghostscript we were able to “print” them to file that way directly.
Would it be possible to add such a feature in Aspose.Pdf?

Thanks by advance for your answer.

Hi Christophe,

Thanks for your interested in our API’s.

In order to accomplish your requirement, you may consider following instructions specified on how to Convert a PDF from RGB colorspace to Grayscale.

If it does not satisfy your requirement, you may consider convert PDF pages to TIFF image with CCIT4 compression and set color depth as 1bb and then transform the TIFF images back to PDF format using Aspose.Pdf for .NET. When using this approach, the size of file is will be reduced. Please visit the following links for further details on

Hi Christophe,

In addition to above suggestion for converting PDF to Black and White, you can use printing feature of Aspose.Pdf to accomplish your printing requirement. You can print to file as per you printer settings, please check following code snippet for the purpose. Hopefully it will help you to accomplish the task. However it there is difference in your requirements and our understanding then please share some more details, so we will guide you accordingly.

viewer = new Aspose.Pdf.Facades.PdfViewer();<o:p></o:p>


//Set PrinterSettings and PageSettings

System.Drawing.Printing.PrinterSettings ps = new System.Drawing.Printing.PrinterSettings();

ps.Copies = 1;

//Set printer, one can find this driver in the list of preinstalled printer drivers in Windows

ps.PrinterName = "Microsoft XPS Document Writer";

//or set the PDF printer

//ps.PrinterName = "Adobe PDF";

//Set output file name and PrintToFile attribute

ps.PrintFileName = "E:/data/HelloWorld.xps";

ps.PrintToFile = true;

//Disable print page dialog

viewer.PrintPageDialog = false;

//Pass printer settings object to the method



Please feel free to contact us for any further assistance.

Best Regards,