EPS file is not converted to grayscale

Hello,

I’m trying to convert EPS image to PDF, and then convert it to grayscale. The code I’m using for that is here:

FileInputStream fileInputStream = new FileInputStream("example.eps");
PsDocument epsImage = new PsDocument(fileInputStream);

ByteArrayOutputStream epsOutputStream = new ByteArrayOutputStream();
epsImage.save(new PdfDevice(epsOutputStream), new PdfSaveOptions());

Document document = new Document(epsOutputStream.toByteArray());
RgbToDeviceGrayConversionStrategy strategy = new RgbToDeviceGrayConversionStrategy();
for (Page page : document.getPages()) {
  strategy.convert(page);
}
document.save("example.pdf");

However, as a result with this example file:
example.eps.zip (516.7 KB)

After the conversion, it’s only partially converted to grayscale:
example.pdf (2.4 MB)

I’m wondering, what could be the reason for that, and also, maybe there is another way to convert EPS to grayscale? I’m using it later as PDFPageStamp.

@ANDREA.FARRIS
I’ll investigate this issue and write you as soon as possible

@ANDREA.FARRIS
Could you attach what result do you get after this part as file?

It seems that it’s Aspose.Page specific logic and unfortunately I can’t reproduce its result

@ilya.zhuykov
Sure, here is the file:
eps_pdf.pdf (1.8 MB)

@ANDREA.FARRIS
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-43817

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.