On 20.12.2007 rfleury asked on this list (with above subject) about embedding image data to PDFs utilizing 'PDF template processor' - without any responses. I'm now facing exactly the same problem. Has somebody found a way to do this ? Resorting to XSL FO does not sound appealing - lack of experience in that field :-/ Thanks in advance for any hints, br, VG -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
You are in luck, we implemented support for this last week. You will
find this in the latest nightly builds. In the oxf:pdf-template configuration, you can write : <image left="290" top="401" dpi="300" scale-percent="40" href="input:my-image"/> And then: <p:processor name="oxf:pdf-template"> <p:input name="data" href="#input-data"/> <p:input name="model" href="#pdf-configuration"/> <p:input name="my-image" href="#my-image"/> <p:output name="data" id="pdf-document"/> </p:processor> We still have to document this processor fully though. -Erik On Apr 7, 2008, at 2:04 PM, VG wrote: > > On 20.12.2007 rfleury asked on this list (with above subject) about > embedding > image data to PDFs utilizing 'PDF template processor' - without any > responses. > > I'm now facing exactly the same problem. Has somebody found a way to > do this ? > Resorting to XSL FO does not sound appealing - lack of experience in > that field > :-/ > > Thanks in advance for any hints, > br, VG > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
You guys are my heroes :-) ! Can't wait to test that ! VG -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Turns out the situation is even better than I thought: I needed the image support in order to generate barcodes in PDF files. I noticed that the DMV example already does this ;-) Now I'll only have to figure out how to generate barcode with dynamic input values (as the example in resources/apps/barcode/barcode.xpl uses a dummy input value). But I think that must be somewhere in the docs ... VG -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
There are barcode fonts that you could use. I have created a OF-based
app that generates bar codes for EDI so I know it works quite nicely. There is quite a bit of "math" involved to get the string right though and every barcode type requires different formula (generally speaking). A. On Apr 10, 2008, at 8:34 PM, VG wrote: > > Turns out the situation is even better than I thought: I needed the > image > support in order to generate barcodes in PDF files. I noticed that > the DMV > example already does this ;-) > > Now I'll only have to figure out how to generate barcode with > dynamic input > values (as the example in resources/apps/barcode/barcode.xpl uses a > dummy input > value). But I think that must be somewhere in the docs ... > > VG > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In addition to image support for the PDF processor, we have added
barcode support directly to the PDF processor. But we have also a separate oxf:barcode processor now. All this is a little experimental, and there is no documentation on all this yet unfortunately... -Erik On Apr 10, 2008, at 11:49 AM, Alexander Zatko wrote: > There are barcode fonts that you could use. I have created a OF- > based app that generates bar codes for EDI so I know it works quite > nicely. There is quite a bit of "math" involved to get the string > right though and every barcode type requires different formula > (generally speaking). > > A. > > On Apr 10, 2008, at 8:34 PM, VG wrote: > >> >> Turns out the situation is even better than I thought: I needed the >> image >> support in order to generate barcodes in PDF files. I noticed that >> the DMV >> example already does this ;-) >> >> Now I'll only have to figure out how to generate barcode with >> dynamic input >> values (as the example in resources/apps/barcode/barcode.xpl uses a >> dummy input >> value). But I think that must be somewhere in the docs ... >> >> VG >> >> -- >> You receive this message as a subscriber of the [hidden email] >> mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
OK, so actually the DMV-14/pdf-model.xml is actually using the direct PDF processor barcode support ? I mean the line : <barcode left="490" top="181" size="2" height="25" value="dmv:driver-license-number"/> I know you said "undocumented" :-) but is there a way to choose codeset (code128 please :-) and the content/placement of textual data ? Now the example shows "*nnnnn*" below the barcode itself. Say I wanted to have something like : Lastname, Firstname |||||||||||||||| nnnnnnn mm/dd/yy where "nnnnnn" is the data for the actual barcode and "dd/mm/yy" is of course the date. Thanks in advance, VG -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
This relies on the iText library, so you can check that library's doc:
http://itextdocs.lowagie.com/tutorial/objects/images/tiff/index.php Yes it seems it supports code128. As far as more configuration parameters, we don't expose all of them to the PDF processor yet, but please let us know which ones you need. It is easy to expose them. -Erik On Apr 11, 2008, at 6:43 AM, VG wrote: > > OK, so actually the DMV-14/pdf-model.xml is actually using the > direct PDF > processor barcode support ? > I mean the line : > > <barcode left="490" top="181" size="2" height="25" > value="dmv:driver-license-number"/> > > I know you said "undocumented" :-) but is there a way to choose > codeset > (code128 please :-) and the content/placement of textual data ? > Now the example shows "*nnnnn*" below the barcode itself. > > Say I wanted to have something like : > > Lastname, Firstname > |||||||||||||||| > nnnnnnn mm/dd/yy > > where "nnnnnn" is the data for the actual barcode and "dd/mm/yy" is > of course > the date. > > Thanks in advance, > VG > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
OK, thanks again! I'll look thru the iText docs and get back in a day or two.
VG -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Erik Bruchez
Hi, Finally checked the iText docs. It would be great to have : - possibility to select type of barcode (Code128 - 3 variants !) - position and size (*) - inclusion / exclusion of the text - positioning of the text *) I think these are already covered in the <barcode> tag attributes : <barcode left="460" top="60" size="2" height="25" value="..."/> although I don't know how to interpret the 'size' parameter :-o ? It looks like I'll have to use separate images or text fields for the extra stuff I was looking for, but that's ok. VG -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
I added (or more accurately, "activated") Code128 support for the barcode -tag in PDF template processor. Use 'type' attribute thusly : <barcode type="CODE128" .... Here's the unified diff for PDFTemplateProcessor.java : --- PDFTemplateProcessor.java~ 2008-04-02 10:26:34.000000000 +0300 +++ PDFTemplateProcessor.java 2008-04-25 14:25:34.000000000 +0300 @@ -494,6 +494,8 @@ private Barcode createBarCode(String type) { if (type.equals("CODE39")) { return new Barcode39(); + } else if (type.equals("CODE128")) { + return new Barcode128(); } else if (type.equals("EAN")) { return new BarcodeEAN(); } VG -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Sounds easy enough of a fix. I committed this. Thanks!
-Erik On Apr 25, 2008, at 7:04 AM, VG wrote: > > I added (or more accurately, "activated") Code128 support for the > barcode -tag > in PDF template processor. Use 'type' attribute thusly : > > <barcode type="CODE128" .... > > Here's the unified diff for PDFTemplateProcessor.java : > > --- PDFTemplateProcessor.java~ 2008-04-02 10:26:34.000000000 +0300 > +++ PDFTemplateProcessor.java 2008-04-25 14:25:34.000000000 +0300 > @@ -494,6 +494,8 @@ > private Barcode createBarCode(String type) { > if (type.equals("CODE39")) { > return new Barcode39(); > + } else if (type.equals("CODE128")) { > + return new Barcode128(); > } else if (type.equals("EAN")) { > return new BarcodeEAN(); > } > > > > > VG > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by VG-3
VG,
I have added an RFE for this: http://forge.objectweb.org/tracker/index.php?func=detail&aid=309515&group_id=168&atid=350207 But if you want to provide a patch, you are welcome ;-) -Erik On Apr 22, 2008, at 3:00 AM, VG wrote: > > Hi, > Finally checked the iText docs. It would be great to have : > > - possibility to select type of barcode (Code128 - 3 variants !) > - position and size (*) > - inclusion / exclusion of the text > - positioning of the text > > *) I think these are already covered in the <barcode> tag attributes : > <barcode left="460" top="60" size="2" height="25" value="..."/> > although I don't know how to interpret the 'size' parameter :-o ? > > It looks like I'll have to use separate images or text fields for > the extra > stuff I was looking for, but that's ok. > > VG > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |