Dear Team,
We are using GroupDocs.Conversion for 21.10 for converting different formats to pdf in java. We observed that while converting XPS to PDF
we see “Not supported file type” OR “Supplied XPS file or stream is corrupt and cannot be parsed!” while converting from below 2 ways:
Case1: “Not supported file type” when using below code snippet
final Converter converter = new Converter(new ByteArrayInputStream(sourceBytes));
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
final PdfConvertOptions options = new PdfConvertOptions();
converter.convert(outputStream, options);
return outputStream.toByteArray();
Case2: “Supplied XPS file or stream is corrupt and cannot be parsed!” when using below code snippet
final Document document = new Document(new ByteArrayInputStream(sourceBytes), new XpsLoadOptions());
document.save(outputStream, new PdfSaveOptions());
return outputStream.toByteArray();
This works fine on Windows machine however fails on integration environment where we are using Linux system.