Hello. In the past, I've used the Alpha report generator to create columnar text/numeric reports in web apps with no problem. In my current web app, I need to produce PDF files containing catalogs of images (mostly JPGs) and their corresponding descriptions. It's not a complicated report, but it can have anywhere from a few images to several hundred, depending on the user.
The problem is that the freeform report doesn't orient/rotate the images properly when I generate it as a PDF. It simply uses a default orientation, without regard to how the user may have rotated their mobile device when they captured and uploaded the image. Also, I can't see any way for the PDF generator to properly decode supplementary characters for text stored as utf8mb4 (4-bytes/character instead of 3). Other than that, the report is formatted correctly on the page and contains the desired footers and page breaks.
If I generate the same report in HTML format, the images are all oriented properly and utf8mb4 characters decode correctly. However, there are no footers or page breaks in the output. In addition, generating a freeform PDF report with a lot of images pretty much takes forever, while the HTML rendering is much quicker. Either way, if there are lots of images to print, I can end up with a 413 error (payload too large) from the server.
Until now, I was under the impression if I generated an Alpha report as a PDF or as an HTML file, it would look the same and not take an eternity to create. Apparently that is not the case. So I am looking for a more efficient solution to producing PDF files for this application. Because of the orientation issue, it looks like generating as HTML is the only viable alternative in Alpha. And maybe using the "chunked responses" mode and the HTML_TO_PDF function is the answer, but if it is, I still don't know how to embed footers and page breaks in the HTML code at the appropriate spots.
Would using Alpha's built-in report generator still be your recommended approach in this case or is there a better/easier way? Am I missing some key point here or trying to implement this using the wrong coding for the report? Am looking for some direction or a resource to help me understand how to create a properly-formatted and printable PDF of any size, with images oriented correctly and text properly decoded.
A few months ago, I submitted a bug report with a test case to Alpha and ended up without any helpful response. I am using the latest Alpha stable release (8867) and publishing to Alpha Cloud. Two sample output files for the same "PrintContent" report are attached, one rendered as a PDF and one as HTML (saved as a PDF). In addition, the attached Xbasic code is used in my callback to create the report.
I am grateful for any help or guidance you can offer! Thank you!
The problem is that the freeform report doesn't orient/rotate the images properly when I generate it as a PDF. It simply uses a default orientation, without regard to how the user may have rotated their mobile device when they captured and uploaded the image. Also, I can't see any way for the PDF generator to properly decode supplementary characters for text stored as utf8mb4 (4-bytes/character instead of 3). Other than that, the report is formatted correctly on the page and contains the desired footers and page breaks.
If I generate the same report in HTML format, the images are all oriented properly and utf8mb4 characters decode correctly. However, there are no footers or page breaks in the output. In addition, generating a freeform PDF report with a lot of images pretty much takes forever, while the HTML rendering is much quicker. Either way, if there are lots of images to print, I can end up with a 413 error (payload too large) from the server.
Until now, I was under the impression if I generated an Alpha report as a PDF or as an HTML file, it would look the same and not take an eternity to create. Apparently that is not the case. So I am looking for a more efficient solution to producing PDF files for this application. Because of the orientation issue, it looks like generating as HTML is the only viable alternative in Alpha. And maybe using the "chunked responses" mode and the HTML_TO_PDF function is the answer, but if it is, I still don't know how to embed footers and page breaks in the HTML code at the appropriate spots.
Would using Alpha's built-in report generator still be your recommended approach in this case or is there a better/easier way? Am I missing some key point here or trying to implement this using the wrong coding for the report? Am looking for some direction or a resource to help me understand how to create a properly-formatted and printable PDF of any size, with images oriented correctly and text properly decoded.
A few months ago, I submitted a bug report with a test case to Alpha and ended up without any helpful response. I am using the latest Alpha stable release (8867) and publishing to Alpha Cloud. Two sample output files for the same "PrintContent" report are attached, one rendered as a PDF and one as HTML (saved as a PDF). In addition, the attached Xbasic code is used in my callback to create the report.
I am grateful for any help or guidance you can offer! Thank you!
Comment