[Happy Halloween everyone!]
Ben Geyer wrote:
At the risk of annoying the fine people on this list, I'll try to
restate my question with the original message in context:
Since Rachel's limitation seems to be the number of pages, would another
approach be to continue processing questions until you reached the end
of the fourth page?
Is there any capability in FOP that would allow for
listening for this event and then tracking which question was the last
rendered?
I don't think so. That would imply that FOP would have knowledge of the
semantics of the text--i.e., what a question is and what delimits it.
This seems like it could be a more simplistic approach to the
problem than pulling the latest off of the trunk.
Opinions?
Thankfully, since the number of possible questions is finite, it may be
simplest for Rachel to just print them all out, measure them each
manually, and use that metric in her database, instead of what she is
calculating with the MyRenderer subclass.
I have had problems with FOP 0.20.5 too in this regard, for some reason
the dimensions of the margins I chose have never really been that
accurate for me when printed out.
Glen
Thanks,
Ben Geyer
Hello,
I have an application which generates surveys and converts the contents to
a PDF via FOP for printing. There is a maximum allowable number of pages
for any given survey. Since each survey generated is dynamic and unique
based on outside information it is necessary for me to calculate the exact
number of inches that each potential question may consume on the resulting
PDF file. The number of inches for each potential question is stored on
the database with the question content.
When the question is saved, I need to render a PDF in order to determine
the content height in inches. We have started off by extending the
PDFRenderer class and adding several methods. The application basically
sends the FO file for conversion and the renderer class ("MyRenderer.java
")
provides a method to calculate height in inches.
I am encountering a problem with the calculation - when the final PDF is
printed the actual number of inches (when measured manually) is somewhat
smaller than what the application gives as the content height in inches. I
am having trouble figuring out what is actually happening here in the
PDFRenderer. The renderWordArea method seems to be called many times even
though there should only be a single word Area.
In the example below we are printing the survey on a
8.5 x 14 (Legal) size
paper. The question itself manually measures out to be approximately 6.9
or 7 inches in height with the margins specified in the FO file. However,
the calculated height in inches is 6.88 inches. When the size of the
question is increased the accuracy gets worse.
<snip/>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]