0
votes

We are migrating our Delpi IntraWeb app from an on-premises installation to an Azure Web App. Our app uses FastReport VCL 5 to export PDF files. This works fine on-premises, but when we do the same thing on Azure Web App, all the images in the PDF are black boxes.

Does anyone have experience with this behavior and can offer help?

Example of the visible image in the FastReport editor

Example of the PDF with black box instead of image

1
Have you contacted FR support? Without any details or code, we can't really debug this issue for you.Ken White
I have, I'm mostly interested in whether another user has a solution. I've seen posts about similar issues on FastReport's forum, but I figured Stackoverflow would reach more people. Unfortunately the bug is in FastReport's code which I don't have, so I can't debug. I'll post here once FastReport support has a solution.P. Bergström
Correction: It's not a bug in FastReport's code. More like a strange decision by Microsoft to not include the necessary graphics functions in their Web App solution.P. Bergström

1 Answers

2
votes

FastReport support have told us they can't solve the issue because Azure Web Apps limit access to certain OS functions, such as the Registry and Graphics. You can read more about it here: https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox

The solution for us was to use FastReport to generate the PDF without the images, and Gnostice PDF Toolkit to add images to the generated PDF file after. PDF Toolkit manages to make real images instead of black boxes. This is a bit of a hacky solution, but it allowed us to rewrite much less code.