Generate document from template action failing for images above 500kB
0
Dear reader, One of the core functionalities in an app we are building is generating PDFs with images in them. There are two ways in our app to add images: 1. Manually add with an image uploader (standard widget) 2. Retreieve images from an API and store a selected one The only visible difference between these images is that the API image does not have an automatically generated thumbnail image. The problem: When we generate PDFs we get this apache error: org.apache.fop.render.intermediate.IFException: I/O error flushing the PDF document When this happens, generating a PDF fails and the user is left with nothing. This is not what we want. We have noticed this peculiarity as well: - Images uploaded through an image uploader widget are always fine - Images retrieved via API can be any size, but when the PDF is generated any of these images above 500kB cause the flushing error. Does anyone know about any special actions done by the mendix built in image uploader widget that make the images work for PDF generation if they are above this 500kB mark, or inversely why images without a thumbnail path fail if they are over 500kB? Our main assumption as of now is that the PDF generation java action tries to find a thumbnail version if the image is above 500kB but can't causing the renderer to break. We'd love to hear any input on this so we can improve the capabilities of image selection within our app, thanks in advance!