FOGProject / fogproject

An open source computer cloning & management system
https://fogproject.org
GNU General Public License v3.0
1.1k stars 221 forks source link

Need some help generating any FoG PDF reports under Rocky Linux 9.X #621

Open user-629782 opened 1 month ago

user-629782 commented 1 month ago

Cannot generate any FoG PDF reports under Rocky Linux 9.X

HTMLDOC Version 1.9.18 Copyright 2011-2024 by Michael R Sweet. HTMLDOC is provided under the terms of the GNU General Public License and comes with absolutely no warranty. This software is based in part on the work of the Independent JPEG Group. This copy of HTMLDOC has been built to support http: URLs only. ERROR: No HTML files! Usage: htmldoc [options] filename1.html [ ... filenameN.html ] htmldoc filename.book ... ...

user-629782 commented 1 month ago

... After further investigation, I reverted line 201 in reportmaker.class.php as before commit https://github.com/FOGProject/fogproject/commit/53f3967eccb48c545266c15ffc3cb6704bfd6e8f just to get the PDF generation going again. I know it's not correct based on your security work but I thought I would show you at least how I got it generating again.

While doing that, I noticed that Firefox (v129.0.1) would not display the PDF page (showed up as blank) correctly. After experimenting with the htmldoc options from line 227 in the reportmaker.class.php file, I found that leaving off the --no-compression option, allows the page to be displayed properly and not blank.

Finally, I see in the latest commit https://github.com/FOGProject/fogproject/commit/4a7b5fe2e08d291788124988303583911912eb3a fixes the upload of the branding logos. However, I am still seeing some strange behavior with the logo that I am still looking into. Things like, multi-page reports do not start on the first page or are only partially written. The logo appears on the second page and is corrupted in some ways (bottom third of logo is inverted color, digitized looking. I created a test logo exactly 650 x 120 pixels in gimp but still not 100% working.

I know Rocky Linux probably is not your target development OS for FoG so I apologize for wasting your time. In any event, I hope these observations help the Devs in some way. Thank you so much for looking into this.

BTW: How do you remove an image file from the CLIENT BANNER IMAGE field in the rebranded section of FoG Settings?

user-629782 commented 1 day ago

After working this problem, I still have questions (in bold) concerning the PDF experience:

-- Using the Stable branch 1.5.10.1583 still requires a reversion of line 201 in commit https://github.com/FOGProject/fogproject/commit/53f3967eccb48c545266c15ffc3cb6704bfd6e8f to get PDF generation working under Rocky Linux 9.4.

Can this be fixed to allow PDF generation and still meet security guidelines?

-- The --no-compression option is still required to allow Firefox v129 to view the generated PDF files after the reversion is applied.

Is this option still necessary for other use cases or can it be removed in the current stable branch?

How do you remove an image file name from the CLIENT BANNER IMAGE field in the rebranded section of FoG Settings?

Any information would be appreciated.