EPS image stamp is rasterised in PDF export

EPS image inserted as a stamp into PDF gets rasterised. Please advise if this is a bug or limitation of aspose.page library?

Dirty code snippet:

@Test
  void vectorImage() throws Exception {
    byte[] imageBytes =
        new ClassPathResource("images/braske.eps").getInputStream().readAllBytes();

    PsDocument vectorDocument = new PsDocument(new ByteArrayInputStream(imageBytes));
    ByteArrayOutputStream vectorOutputStream = new ByteArrayOutputStream();
    vectorDocument.saveAsPdf(vectorOutputStream, new PdfSaveOptions());

    ByteArrayInputStream vectorInputStream = new ByteArrayInputStream(vectorOutputStream.toByteArray());
    PdfPageStamp stamp = new PdfPageStamp(vectorInputStream, 1);
    try (Document document = new Document()) {
      document.getPages().add().addStamp(stamp);
      document.save("images/pdfOutputStream.pdf");
    } catch (Exception e) {
      e.printStackTrace();
    }

braske.eps.zip (328.9 KB)

@dfinsolutions

We tested in our environment. Can you please share the expected PDF document as well that you want to obtain from the API? How you want the stamp in the output PDF (if not as rasterized image)?

Hi @asad.ali ,
Thanks for your response. Ideally, we would expect that can retain vector file quality when it is inserted into pdf as a stamp. I found very similar discussion happened several years ago related to poor svg file quality when it is added as a stamp. More details can be found here - SVG to Aspose Image to be passed to StampAnnotation - #17 by asad.ali
Does aspose provide a way to retain vector file quality added as a stamp into pdf?

@ANDREA.FARRIS

Thanks for the feedback. The ticket reference that you shared have not been yet fully investigated sadly. However, if you could please share an expected output PDF as well for our reference, we can generate a ticket about Aspose.Page as well to check the feasibility.