Hi,
I am using jdk1.3 and bea 7. I need to show the
barcode in a rtf format which is generated from xsl:fo . I
am using the code below
<fo:block>
<fo:instream-foreign-object>
<barcode:barcode
xmlns:barcode="http://www.krysalis.org/barcode/ns"
msg="my message"
<barcode:code128>
<barcode:height>8mm</barcode:height>
</barcode:code128>
</barcode:barcode></fo:instream-foreign-object>
</fo:block>
but nothing is coming up, and I am not getting any
exception. I am able to get the barcode using the
barcodeservlet from the jsp that is the example given.
If some one faced this kind of problem or have a solution
for this , please send it.
Thank You,
Jayakumar
Jaya_selva@yahoo.com
Logged In: YES
user_id=225352
Hi Jayakumar,
I'm afraid what you're trying to do is currently not possible
because of two aspects:
- The barcode extension (or any SVG for that matter) doesn't
work with RTF output.
- RTF output support doesn't exist on FOP 0.20.5 and
Barcode4J only supports FOP 0.20.5 right now. I guess
you've downloaded the latest source code from CVS to get
RTF output, right? I'm also one of the FOP developers, so I'd
be interested to hear what your experiences are with the RTF
output in FOP CVS HEAD.
I'm sorry that I can't give you a better answer right now. But if
you want I can give you some pointers if you want to try to
implement the missing functionality yourself. I don't have time
at the moment.
Jeremias Maerki
Logged In: NO
Thank You for the reply, I need to generate a rtf document on
the fly (ie )by putting the real time input.
For example
The RTF document contains static data like
The Number of items found in the cart is X.
where X is the dynamic data. SO to do this functionality I am
using
org.jfor.jfor.converter.Converter; class and
org.xml.sax.InputSource;
Which converts the xsl:fo document into rtf document with
static and dynamic data ,I am able to get the RTF document
without the barcode, now I need to get it with the barcode. Is
there anyway I can do this functionality.
I am able to generate the barcode from the barcodeservlet for
the jpeg from the jsp page as per the example given. Is it
possible to convert the output to an image file coming from
the Barocde servlet. Please suggest.
Logged In: YES
user_id=225352
Yes, of course, if you can deploy the barcode servlet you can
use fo:external-graphic to fetch barcodes from the servlet.
Simply put the right URL in the "src" attribute of fo:external-
graphic. That should be quite easy to do and should work
with the RTF output. Good luck!
Logged In: NO
<fo:block>
<fo:external-graphic c="http://localhhost:8080/internal/genbc?
type=code39&msg=1233223&height=3.5&mw=.17&wf=1.8&q
z=1cm&hrp=none&fmt=jpeg&hrsize=8pt&hrfont=Helvetica&res
=300"></fo:external-graphic>
</fo:block>
I used the code above for generating the barocode, but I am
getting the exception as follows
org.jfor.jfor.converter.ConverterLogChannel - jfor.INFO: jfor
V0.7.1 - setting
up conversion...
2005-04-11 11:18:42,531 [ExecuteThread: '9' for
queue: 'default'] DEBUG
org.jfor.jfor.converter.ConverterLogChannel - jfor.INFO:
Parsing xsl:fo docume
nt...
javax.servlet.ServletException: The reference to entity "msg"
must end with the ';' delimiter.
at
com.massconnections.ets.web.version.DocumentFilter.doFilte
r(DocumentFilter.java:133)
at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:27)
at
weblogic.servlet.internal.RequestDispatcherImpl.include
(RequestDispatcherImpl.java:546)
at
weblogic.servlet.internal.RequestDispatcherImpl.include
(RequestDispatcherImpl.java:369)
at
com.massconnections.ets.web.version.VersionDetailQuestion
sAction.performDownloadStoreReportFormExt
(VersionDetailQuestionsAction.java:414)
at java.lang.reflect.Method.invoke(Native Method)
at
com.massconnections.ets.web.ETSAction.invokeActionMetho
d(ETSAction.java:540)
at com.massconnections.ets.web.ETSAction.perform
(ETSAction.java:624)
at
org.apache.struts.action.ActionServlet.processActionPerform
(ActionServlet.java:1787)
at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1586)
at org.apache.struts.action.ActionServlet.doGet
(ActionServlet.java:492)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationActi
on.run(ServletStubImpl.java:1058)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:401)
at weblogic.servlet.internal.TailFilter.doFilter
(TailFilter.java:20)
at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:27)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvoca
tionAction.run(WebAppServletContext.java:5451)
at
weblogic.security.service.SecurityServiceManager.runAs
(SecurityServiceManager.java:780)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java:3105)
at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java:2588)
at weblogic.kernel.ExecuteThread.execute
(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run
(ExecuteThread.java:189)
Could You please assist me. Thank You
Logged In: NO
Hi Jeremias Mrki,
I can able to generate the barcode from the fsl:fo
document.by using the BitMapCanvasProvider and
BarcodeGenerator class .
Thank You for your help and If anyone need help regarding
this they can approach me.
My Mail Id is jaya_selva@yahoo.com.
Logged In: YES
user_id=225352
I'm sorry for not answering earlier. I've been away this week.
I'm glad you managed to get it to work. Still, to say
something about the following error message:
javax.servlet.ServletException: The reference to entity "msg"
must end with the ';' delimiter.
This means that "&" (ampersands) must be properly encoded
in XML: & becomes &
So, I take it I can close this issue.