Hello
I used a simple example on the Internet about how to use FOP in java
(http://javaboutique.internet.com/tutorials/FOP/):
- I Created a simple Java application with a class that takes an XML and
converts it into a PDF (using a XSL) containing an image. The name of my
class is Process.java
Hi,
you must implementing the UriResolver and set your fopFactory with it.
fopFactoy.setUriResolver()
regards,
Philippe
2010/2/18 pjmorce pjcarva...@gmail.com
Hello
I used a simple example on the Internet about how to use FOP in java
(http://javaboutique.internet.com/tutorials/FOP/):
Hi,
It is more of a URL problem, try pass URL 'file:/img/logo.gif' instead
of relative path.
Thanks,
Venkat.
philippe voncken wrote:
Hi,
you must implementing the UriResolver and set your fopFactory with it.
fopFactoy.setUriResolver()
regards,
Philippe
2010/2/18 pjmorce
Thanks for your answer.
I am not familiarized with URIResolver but I check it and, if I understood,
I must implement it creating a new class that implements the URIResolver
class and the method resolve(String href, String base)
In the javadoc the definition of both arguments are:
href - An href
I tried your suggestion:
in the XSL I have now the following code and the problem remains:
fo:block
fo:external-graphic src=url('file:/img/logo.gif')/
/fo:block
However, i also tried to put this and it worked:
fo:block
fo:external-graphic
Yes, it's right.
implement your UriResolver, set the fopFactory and debug your programme.
You will see that you pass in your resolve(String href, String base) method
when fop search your image. in href you'll see your image file name and so
you can plugged your real image with the inputStream
Hi pjmorce,
Assuming TstFOP.jar is on the server and found by your application server, what
happens if you use
fo:block
fo:external-graphic src=url('file:TstFOP.jar!/img/logo.gif')/
/fo:block
Mit freundlichen Grüßen
Georg Datterl
-- Kontakt --
Georg Datterl
Geneon media
Sorry, with this xsl it'll work in root element classpath :
fo:block
fo:external-graphic src=url('/logo.gif')/
/fo:block
Philippe
2010/2/18 philippe voncken m...@philippevoncken.com
With my SimpleUriResolver() you must use xsl as follow:
fo:block
fo:external-graphic src=url('logo.gif')/
With my SimpleUriResolver() you must use xsl as follow:
fo:block
fo:external-graphic src=url('logo.gif')/
/fo:block
if logo.gif is in your classpath root element, it will work.
Philippe
2010/2/18 Georg Datterl gdatt...@geneon.de
Hi pjmorce,
Assuming TstFOP.jar is on the server and found
Thank you all.
I found the answer for my prays.
The answer were in dead on URIResolver. I just had to add this into my code
to configure my FOUserAgent.
(So easy, but so much difficult to find the solution)
// configure foUserAgent as desired
foUserAgent.setURIResolver(new URIResolver() {
yes, sorry. i meen thought, not think:). i think that it is possible in
automatic mode when i write the first message:)
thanks for help!
Mario Madunic wrote:
I'm guessing since no one else has replied maybe there is no automatic way
of doing it at the moment. Maybe someone has written an
hello. i use fop.
i have this xsl-fo:
?xml version=1.0 encoding=UTF-8?
fo:root xmlns:m=http://www.w3.org/1998/Math/MathML;
xmlns:fo=http://www.w3.org/1999/XSL/Format;
fo:layout-master-set
fo:simple-page-master master-name=my-page-with-out-margin
I am still struggling with this one...anybody might have a answer or
direction?
On Tue, Feb 9, 2010 at 10:40 AM, Raphael Parree rpar...@gmail.com wrote:
Hi,
I wrote an XMLFilterImpl which produces a instream-foreign-object. In
another filter i was able to call the super methods to push the
Dear Fop Users,
I'm facing a very strange behavior with fop095/jdk1.6 and mixed content
(Instream and text) inside a table cell :
. If the text is alone inside the cell, it is centered.
. If the instream object is alone inside the cell, it is centered too.
. But with booth inside the same cell,
Jeandur,
I don't see anything wrong.
In the 3rd cell, since the height of the cell equals to its content,
display-align cannot affect it.
If you are speaking about the vertical alignment of the image within its
line, this is another topic.
You can change the vertical alignment of a graphic
Hi,
If you keep the third cell elements in another table, then it should work.
Third cell should be
fo:table-cell display-align=center border-width=0.5mm
border-style=solid
fo:block
fo:table
fo:table-body
fo:table-row
Hi,
you can also uses a text-align attribute on the block element.
Philippe
2010/2/18 Venkat Reddy vanukuri.ven...@googlemail.com
Hi,
If you keep the third cell elements in another table, then it should work.
Third cell should be
fo:table-cell display-align=center
Thanks for your answer,
but text-align works for horizontal alignment not vertical one
Jean
Message du 18/02/10 15:22
De : philippe voncken
A : fop-users@xmlgraphics.apache.org
Copie à :
Objet : Re: Table cell, vertical alignment with text and Instream
Hi,
you can also uses a text-align
Thanks Venkat for your answer,
It seems a little bit difficult for us to get this solution working because the
xsl-fo is produced automaticaly and the content of the cell could be very
difficult to be split in a new table.
Jean.
Message du 18/02/10 14:57
De : Venkat Reddy
A :
Thanks Pascal for your answer.
You are right I'm speaking about the vertical alignment of the image within
its line.
Putting a vertical-align on the instream does the work.
To get this behavior we will have to analyze the cell content, before its xslt
transformation to xsl-fo, to have the
Jean,
If you want to center each graphic on its own line, you have to adjust
its vertical position regarding its vertical size.
So this is a graphic-by-graphic treatment, witch cannot be done at cells
level.
Pascal
jean.duracel a écrit :
Thanks Pascal for your answer.
You are right I'm
Readind back your request, you probably want to align the 1st line of
each cell of the same row on the same baseline.
This is exactly the purpose of the relative-align property, witch
unfortunately is not yet supported by FOP.
Pascal
Pascal Sancho a écrit :
Jean,
If you want to center each
Hi Vincent
Many thanks for your guidance.
I have tried with one surrounding block-container, which looks to be
working OK. If I then place that within a table or alongside other
non-positioned block-containers it does not work.
I will need to test this some more and will come back with my
23 matches
Mail list logo