Re: OMR codes

2004-01-09 Thread Mark Williams
Many thanks for the pointers.

Regards,

Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OMR codes

2004-01-08 Thread Mark Williams



Hi,

I am interested in this subject also. I would 
be grateful if there could be an open posting on this.

Thanks,

Mark Williams

  - Original Message - 
  From: 
  shalini reddy 
  
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, January 07, 2004 4:01 
  PM
  Subject: OMR codes
  
  Hi
  
  I am a new FOP user.
  
  I have a requirement on OMR codes using FOP. 
  I know that Rob Stote has replied a great solution as to how 
  toinsert OMR codes in PDF document.
  
  Rob,
  Could you please let me know your e-mail address because, I have the same 
  requirement as you had some time earlier and I can ask further clarifications 
  on OMR mark codes.
  
  Thanks
  Shailaja.
  
  
  Do you Yahoo!?Yahoo! Hotjobs: Enter 
  the "Signing Bonus" Sweepstakes


Re: OMR codes

2004-01-08 Thread J.Pietschmann
Mark Williams wrote:
I am interested in this subject also.  I would be grateful if there could be
an open posting on this.

Check
 http://marc.theaimsgroup.com/?l=fop-userw=2r=1s=omrq=b
 http://marc.theaimsgroup.com/?l=fop-devw=2r=1s=omrq=b
for the combined wisdom.
If your OMR marks need the total number of pages, you probably
need two rendering passes. This requires you to write some Java
code, check
 http://xml.apache.org/fop/fo.html#fo-total-pages
for sample code.
Once you know the total number of pages, generate a page sequence
master with lots of single page masters, each for an indvidual
page, with some individual static content containing the OMR
for example as SVG:
  fo:root
fo:layout-master-set
   fo:simple-page-master name=page1 ... 
  fo:region-body .../
  fo:region-after region-name=page1-after ... /
  ...
   /fo:simple-page-master
   fo:simple-page-master name=page2 ... 
  fo:region-body .../
  fo:region-after region-name=page2-after ... /
  ...
   /fo:simple-page-master
   fo:page-sequence-master name=main
  fo:single-page-master-reference master-reference=page1/
  fo:single-page-master-reference master-reference=page2/
  ...
   /fo:page-sequence-master
/fo:layout-master-set
fo:page-sequence master-reference=main
  fo:static-content flow-name=page1-after
 ... OMR for page1
  /fo:static-content
  fo:static-content flow-name=page2-after
 ... OMR for page2
  /fo:static-content
.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


OMR codes

2004-01-07 Thread shalini reddy
Hi

I am a new FOP user.

I have a requirement on OMR codes using FOP. 
I know that Rob Stote has replied a great solution as to how toinsert OMR codes in PDF document.

Rob,
Could you please let me know your e-mail address because, I have the same requirement as you had some time earlier and I can ask further clarifications on OMR mark codes.

Thanks
Shailaja.
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

OMR Codes

2003-10-15 Thread Sascha Schmidt

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]

Re: OMR Codes

2003-10-15 Thread Rob Stote
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]



Antwort: Re: OMR Codes

2003-10-15 Thread Sascha Schmidt

Hello Rob,

Thanx for the fast response! It's a good idea to use SVG templates, but for the moment I'll try to realize OMR with an extension (this should run faster). 
I'll post a message here when I've succeeded or not. :o)

Sascha

PS: My extension works now better...




Bitte antworten an [EMAIL PROTECTED]
An:[EMAIL PROTECTED]
Kopie: 
Thema:Re: OMR Codes


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]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]