Home » Developing U++ » U++ Developers corner » HTML viewer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: HTML viewer [message #62003 is a reply to message #62002] |
Thu, 21 May 2026 17:58   |
 |
forlano
Messages: 1230 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
Hello,
here is my latest version.
I added a zoom dropdown list that immediately updates the zoom level of the file currently displayed in the Ctrl.
There is also a method to load a TXT file, automatically wrapped in HTML using the <pre> tag (see next post for a screenshot). It is very convenient for displaying plain text reports.
There is also a Print button which unfortunately still does not work properly. Sometimes it produces no output at all, and when it does work, the fonts are microscopic. Printing is actually the most important feature for me, but neither I nor ClaudeAI had enough expertise to fully solve the issues related to font scaling, margins, and pagination. This is currently the only thing preventing me from using this Viewer in production.
At the moment I am struggling with QTF and TXT reports, especially when reports contain many columns. With this Ctrl I finally have a single viewer for both formats. Using zoom, I can adapt the content to the page width quite nicely, but without reliable printing support it remains incomplete for my needs.
I really hope that one of our U++ gurus may eventually take a look at the print method (PrinterJob) and help finish this part. I honestly believe this Ctrl has great potential, especially for reports with wide horizontal layouts and relatively simple CSS. It could become a lightweight and practical alternative to QTF in many scenarios.
To compile it, optimization must be disabled (remove the default -O3) and the following include paths must be added:
C:\Users\forla\Documents\MyAppsExp\LHUpp\litehtml\src\gumbo\ include
C:\Users\forla\Documents\MyAppsExp\LHUpp\litehtml\src\gumbo\ include\gumbo
C:\Users\forla\Documents\MyAppsExp\LHUpp\litehtml\include
C:\Users\forla\Documents\MyAppsExp\LHUpp\litehtml\include\li tehtml
Perhaps these include paths could be configured automatically inside the package somehow.
If Klugier or anyone else believes this project is worth completing and publishing on UppHub, please feel free to continue the work. I think the foundation is already quite promising, and it would be great to see it evolve into a fully usable component for the community.
Thanks to all of you,
Luigi
-
Attachment: LHUpp.zip
(Size: 917.96KB, Downloaded 0 times)
|
|
|
|
|
|
Goto Forum:
Current Time: Thu May 21 21:40:07 GMT+2 2026
Total time taken to generate the page: 0.00595 seconds
|