Hi Glenn, Alexios,
One of the key requirements when we implemented IF XML, was the ability
to make modifications. Thanks to Alex for provide a list of business
reasons why that is necessary. I agree with those use cases. Some of the
others are adding barcodes, OMR marks, large file page numbering.
We want to see this original requirement for IF XML maintained.
On 28/04/2013 20:15, Alexios Giotis wrote:
On 26 Apr 2013, at 23:45, Glenn Adams <gl...@skynav.com> wrote:
(3) I am not (yet) convinced in the wisdom of supporting modification to the IF
text, but I'm open to learn about use cases;
Interesting thread, I will just attempt to describe some use cases where I need
to modify the IF text.
1. Printing jobs
This is selecting documents, grouping / sorting them (e.g. group per range of
pages so they fit in a certain envelope type and then sort by zip code) and
then splitting them in to batches of about 20000 pages each. This is done by
first rendering each document to IF and then concatenating them to the final
output format. I need to first create the IF because:
- The number of pages of each document is not known in advance (e.g. from the
XSL:FO) and this is an important criterion for creating batches.
- It is not efficient (or possible) to render documents of 20k or more pages.
During rendering the IF to the final output format there are some SAX filters
installed after XMLReader and before FOP that on the fly modify the IF. This is
typically needed to:
- Add page / sheet / document and other counters across each printing batch
and for the whole printing job.
- Adding barcodes / OMRs or other symbols that drive the inserter (enveloping
2. Fast rendering of documents
Rendering is a resource intensive process and we need to serve documents fastly
regardless of their size. What we do it to 'cache' IF. A user selects a
document and then based on her permissions and the parts she selected, we
render part of the cached IF to PDF (no other formats in that case). But there
are some parts that we need to change, the most common being the total number
of pages (e.g. the N in Page 1 of N). We change it by either replacing a text
placeholder with the actual value or by overlaying each cached IF page with a
short, dynamically generated one. The first approach is faster but not optimal
if we assumed one or two digits for N but it is a four digit number.
3. Rendering really big documents
There is customer (of one of our customers) that has a monthly invoice of 60k
pages and he gets that printed. FOP can't render such big documents with a
single pass and we need to modify partial IFs.
We do have other use cases but I hope I described some of them.