× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Marco,

There are a number of advantages to using pure HTML and CSS as opposed to
using an alternative template language, which then may be compiled into a
Java Object that subsequently generates HTML as in the case of Jasper, or a
template language which may be subsequently interpreted and transformed
into HTML as in the case of Freemarker. Pure HTML combined with CSS is more
robust and functional. Lots of educational resources for learning HTML and
CSS. Lots of WYSIWYG editors. Pure HTML and CSS can be immediately
displayed in all types of browsers without first having to compile it into
a software component or initiate a 3rd party transformer. Pure HTML and CSS
provides for "responsive design", which means that the layout can
automatically adapt to different page sizes; or portrait vs. landscape.
Your applications may allow users to select page sizes or orientations and
the layout will adapt accordingly, without the need for custom code. The
design process is a lot faster when you eliminate the "engine" aspect of
alternatives.

When you use RPG to generate documents and reports as opposed to Java, the
CPU consumption drops 20 to 50 times or so. Users definitely notice that
reports generate quickly as opposed to lagging. Users of our student
information system often generate 5,000+ pages of student report cards in
PDF format without any problem. RPG enables robust conditional logic for
generating HTML files from HTML templates. Then a single function call
transforms the HTML file to a PDF file. There are lots of options for using
JSON data sources within RPG.

Nathan.


On Mon, Jul 5, 2021 at 8:54 AM Marco Facchinetti <
marco.facchinetti@xxxxxxxxx> wrote:

Hi Nathan, sorry for the late answer.

Il giorno mer 30 giu 2021 alle ore 17:48 Nathan Andelin <
nandelin@xxxxxxxxx>
ha scritto:

Hi Marco,

I appreciate your feedback. Could you further explain your concern about
generating documents vs. reports? Also explain what data-source options
you're interested in?

Our target is to enable the end user to modify (or create) templates.
They
need to be able to handle basic text, formatting, tables, and bulleted and
numbered lists. Furthermore, they must be able to insert placeholders for
the data and condition the presence or absence of certain sections based on
specific conditions. This last part is managed (today) by Freemarker.
An average document contains 70 to 90 pages, the final document (usually)
20 to 30 pages. This is due to the application of the If clauses:
[if OrderHeader.OrderType = 'Toys']
This order contains [if OrderHeader.Attributes.Dangerous = 'Yes']dangerous
[/if]Toys
[/if]

As for the data source we prefer to use Json.

In regard to generating documents, from my perspective that's what
templates are great for, whether generating HTML, XML, JSON, or other
formatted documents. A single program might generate any number of
formatted output streams based on the same data source; just use an RPG
API
to merge the data source with whatever template might be selected.

Documents may be complex. For example, one of our applications generates
a
roughly 15 page education plan for students, which consists of content
from
something like 30 different data sources. The template for the education
plan is a single HTML file that has many sections.


How do you choose which sections to print and which not to print?


There are many WYSIWYG options for designing HTML templates. Our
preference
is an old version of Dreamweaver. HTML provides pixel-level control over
layout and can be supplemented by CSS styles.


I'll check if they have a usable version in a browser (javascript
compatible).


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.