• Welcome to Theos PowerBasic Museum 2017.

News:

Attachments are only available to registered users.
Please register using your full, real name.

Main Menu

PB 10 and HTML

Started by Rick Kelly, November 26, 2011, 07:46:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rick Kelly

I've read some posts from Jose where he pops up windows that have rendered HTML pages. I'm at the point in my project where I have to decide how to handle reports. I was leaning towards generating PDF's. Is HTML rendered preview windows with some navigation controls and a print feature a viable way to go?

Rick Kelly

Edwin Knoppert

Main differences is that ordinary html is not a container file as pdf is, meaning:
html and images are not saved into a single file.

There is the mht format which actually does that, it makes html portable like pdf is.
PDF is created to have a more precise reproduction for different printers (and nowadays on screens as well)

Html lacks some precision of positioning elements and even worse, by default it is used as 'flow' (it's rendered as it goes).
PDF = positioning all over.
Positioning also applies to sizes and scaling while html is not great with that.

Haakon Birkeland

If you choose to go the HTML path, the QHTM library might be of interest to you for some of the tasks you need to solve. You should keep in mind some of the limitations and issues introduced by going the HTML path. For instance the engines rendering your content will vary a lot, and their interpretation will sometimes differ to the unacceptable — especially when it comes to printing. How many "blank" pages have you seen when printing HTML content?! I've seen way to many.

As for the PDF route, I see a much more controllable and uniform experience with quite a few added opportunities — like for instance obvious things like pages and control of what goes on them. Close to full control and a sufficiently set of options have made me go for using PDF's for a long time, and I'm using the component of my choice with both PB applications and on-line.

http://www.jose.it-berater.org/smfforum/index.php?topic=3132.0
http://gipsysoft.com

http://www.quickpdflibrary.com

Edwin Knoppert

#3
The combination pdf and the free acrobat reader is a very good one.
Acrobat has a terrific printer engine for example.

For common tasks like printing text and images positioned the PDF language by itself is not a difficult one.
The way it stores parts as objects in the pdf is the is the more difficult part to understand imo to make these kind of pdf's, in practise it's not really difficult.

Lately i did some 'hacking' to remove certain text from a pdf where text contents where stored as binary streams, this is simply done via 'zlib buffer compression'.
Just mentioning it that even compressed pdf's are easy to accomplish.

Creating a basic pdf for holding text and images could easily be done with PowerBASIC and maybe if someone has the time.., it would be nice to have.
Typically something i would create for myself but i have other things currently.

Rick Kelly

Quote from: Haakon Birkeland on November 27, 2011, 08:28:51 PM
If you choose to go the HTML path, the QHTM library might be of interest to you for some of the tasks you need to solve. You should keep in mind some of the limitations and issues introduced by going the HTML path. For instance the engines rendering your content will vary a lot, and their interpretation will sometimes differ to the unacceptable — especially when it comes to printing. How many "blank" pages have you seen when printing HTML content?! I've seen way to many.

As for the PDF route, I see a much more controllable and uniform experience with quite a few added opportunities — like for instance obvious things like pages and control of what goes on them. Close to full control and a sufficiently set of options have made me go for using PDF's for a long time, and I'm using the component of my choice with both PB applications and on-line.

http://www.jose.it-berater.org/smfforum/index.php?topic=3132.0
http://gipsysoft.com

http://www.quickpdflibrary.com

Thanks for all the input. The quick pdf library is what I had come down to after a few weeks of research and testing. I did start writing some PB code to build PDF's and didn't think that basic functionality was too hard to grasp but getting this project done quicker is more important and I didn't want to hassle with previews and printing all that much.

Rick Kelly