RE: trying to extend FOP to handle Barcodes

2002-11-21 Thread Raffi Simon

thank you Jason, I have found a servlet that does the same, but I can not convert the image in the pcl output file. I need the image to be in the pcl output file to send to the printer. Thank you.
-RafTired of spam? Get advanced junk mail protection with MSN 8.

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



RE: trying to extend FOP to handle Barcodes

2002-11-21 Thread FOP Mailing List
Raffi,
  I have a servlet that i wrote which takes as parameters a string to encode as 
a barcode, the barcode type, and the size in pixes you want the barcode to be. 
It returns a GIF image. 


Jason


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



Re: trying to extend FOP to handle Barcodes

2002-11-21 Thread Jeremias Maerki
I haven't done this before you I can try to give you some pointers:

1. Have a look at this page: http://xml.apache.org/fop/extensions.html
2. I'd implement your extension as fo:instream-foreign-object, like SVG
is implemented.

Example:


http://mybarcodeext";>12345



3. Have a look at the following classes as a template to add support for
your extension:
- org.apache.fop.svg.SVGObj
- org.apache.fop.svg.SVGElement
- org.apache.fop.svg.SVGArea
- org.apache.fop.svg.SVGElementMapping (to register the extension)
4. Last but not least you will have to either change or subclass
org.apache.fop.render.pcl.PCLRenderer to support your extension. The
renderer is not really finished especially what SVG is concerned and
that's why there is still something to do. Other renderers like PDF will
help you to make it work.

I hope that helps a bit.

On 21.11.2002 03:58:53 Raffi Simon wrote:
> I am trying to add a new element called barcode ( 
> ) to the PCL rendering FOP. I would like to be 
> able to insert this into a table or block and have the parser to attach the 
> correct pcl command that i will define, whenever it sees this element. For 
> example if I do this:
> 
> 12345 I would like my output 
> stream (pcl) to have the starting pcl command (to turn the barcode chip on 
> the Hp printer on) print the digits that follow in the barcode format and 
> then the closing PCL command (to turn off the chip on the printer) can anyone 
> help me extend the FOP to do this. I am at a lose.


Jeremias Maerki


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