Title: HTMLBox Question Post by: Gary C. on June 28, 2011, 04:13:46 pm Hi
I need to be able to produce a report (it is actually a product technical specification) and it will contain text formatted as html. The HTMLBox works great but does not span pages - most of the specifications though have more than a page worth of text. Does anyone have any suggestions as to possible ways to work around this? Thanks Gary Title: Re: HTMLBox Question Post by: Alex G. on June 28, 2011, 05:10:15 pm Hi Gary,
If you cut the HTML document into smaller chunks (for example have each paragraph start a new chunk) and output each of these as a separate HTMLBox then it will appear as one document and a page break will appear whenever a chunk as a whole doesn't fit the page anymore. The potential whitespace at the bottom of a page will be smaller if the chunks are smaller. If the document data is stored in a 4GL variable (rather than using a url pointing to a file) then the splitting loop can be written in 4GL. As a start you could split at any P,BR, H1, H2,..,OL,TABLE,.. element. You can do this using the XML functions in case it is a XML document and otherwise use the string functions. Then the fragments are surrounded by "<HTML><BODY>" and shipped in a PRINT statement. If you have long tables or item lists then these may produce large gaps or the fragments may not fit on the page at all. In any case I will ask a request for enhancement to be filed for this. Regards, Alex Title: Re: HTMLBox Question Post by: Christine R. on June 28, 2011, 05:19:52 pm Hello,
The following request has been registered in our database for that: #20535 : Having the possibility for HTMLBox to span pages. Best regards, Christine HEIM-REBIERE Four J's Support Team |