Convert PDF to Black and White

converted.pdf (683.3 KB)
desired.pdf (581.0 KB)
document111068.pdf (683.4 KB)

Hello I am trying to convert a pdf to Black and White and I am not getting the desired result. There are places where there are just big black lines and the text is not visible. For reference look at the document named converted. I have also uploaded the original and desired docs.

The Code i am using is

Aspose.Pdf.RgbToDeviceGrayConversionStrategy strategy = new Aspose.Pdf.RgbToDeviceGrayConversionStrategy();
for (int idxPage = 1; idxPage <= PDF.Pages.Count; idxPage++)
{
// Get instance of particular page inside PDF
Page page = PDF.Pages[idxPage];
// Convert the RGB colorspace image to GrayScale colorspace
strategy.Convert(page);
}

.

@talhamalik97

We were able to notice the issue in our environment while using Aspose.PDF for .NET 21.2. Therefore, we have logged it as PDFNET-49589 in our issue tracking system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFNET-49589) have been fixed in Aspose.PDF for .NET 23.7.