Hi,
I upgraded aspose.pdf for Java from 24.5 to 24.6 and when I did, the conversion from XFA to standard PDF throws a exception:
No enum constant com.aspose.pdf.BoxStyle.Default
Code is as simple as
try (InputStream is = new ByteArrayInputStream(xfaBytes);
com.aspose.pdf.Document document = new com.aspose.pdf.Document(is);
ByteArrayOutputStream outPDF = new ByteArrayOutputStream(8096);
) {
document.getForm().setType(FormType.Standard);
document.save(outPDF);
return outPDF.toByteArray();
} catch (Exception e) {
e.printStackTrace();
}
I can’t unfortunately share any XFA for this test.
Thanks
@brissonp
We are afraid that we cannot comment further or determine the cause of the issue without replicating it in our environment. If possible, would you please share your sample file with us so that we can test the scenario in our environment and address it accordingly.
Hi, here is a sample XFA I found online and it returns the exact same error when upgrading from 24.5 to 24.6
purchase_order.pdf (143.6 KB)
@brissonp
This is the type of exception that we faced in our environment. Is it similar to what you are experiencing?
If you are talking about the exception that has
No enum constant com.aspose.pdf.BoxStyle.Default
Than yes
@brissonp
Sorry for the over communication. We somehow missed the attachment. Nevertheless, below is the exception that we faced in our environment and it is different than what you mentioned.
image.png (61.1 KB)
It is exactly the same error that I get.
@brissonp
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-44185
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.