Sascha:
I was in the same boat as you a few months ago. I was going to go the
extension route but decided not to.
I am assuming that the location, and amount of OMR marks are dependant
on the number of pages that you are producing? (this was the case for
us)
If so here is how I tackled the problem (keep in mind that we did not
have time to develop an extension, not the inclination):
1) Render the document twice
2) on the second pass, ie second rendering use we used the
driver.getpageCount(Number), to get the number of pages in the final
document.
3) set this value in a parameter in one of your style-sheets.
4) use this value to call to a template that absolutely positions SVG
graphics (lines) on a page. In our case it was the upper right hand
corner of the page.
The telecommunication company that we were dealing with had 22 possible
OMR marks, and every variation there in. Was it a pain in the butt to
create the template with all the marks yes, but once it was done all you
had to to was call to the template and place the marks base on page
count. This was our solution, let me know if you need more detail.
Rob
On Wed, 2003-10-15 at 04:29, Sascha Schmidt wrote:
> Dear FOPies,
>
> We are generating PDF document with FOP and need to insert optical
> marks at the left side of every odd page. I plan to insert these marks
> with a FOP extension that shall create a BlockArea with several
> LineAreas. The LineArea contains ____ (underline characters) or is
> blank. How can build the BlockArea?
>
> This is my (not working) extension method (area is also a block):
>
> public int layout(Area area) throws FOPException {
> BlockArea block = new BlockArea(
> area.getFontState(),100,100,0,100,0,
> Constants.AUTO,0,30);
>
> LineArea line = block.createNextLineArea();
> block.addChild(line);
> TextState ts = new TextState();
> line.addText("____".toCharArray(), 0, 50,
> getParent().getLinkSet(), ts);
>
> area.addChild(block);
> return Status.OK;
> }
>
> Could somebody give me a hint please?
> In another thread I've read about a possibility to insert optical
> marks through post-processing the PDF (not PS). Does anybody know a
> free java tool for doing that?
>
> Thanx,
> Sascha
>
> ______________________________________________________________________
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]