[ERROR] Image not found

2010-02-18 Thread pjmorce

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 and it has a method "process". It works fine when
called directly as a java application.

  - I Created a simple web service that just call this "process" method of
that class. However, when i call the web service, i get an error:
"[ERROR] Image not found: img/logo.gif"
=> The PDF is created but without the image.

Here is the code of my Process.java class:

  public static String process(String xml, String xsl) {
String sResult = null;


try {

ByteArrayOutputStream foOut = new ByteArrayOutputStream();

ByteArrayOutputStream bOut = new ByteArrayOutputStream();
InputStream iss =
Process.class.getClassLoader().getResourceAsStream(brique);
copyFile(new BufferedInputStream(iss), bOut);

SAXBuilder builder = new SAXBuilder();
Document document = builder.build(new
ByteArrayInputStream(xml.getBytes()));

TransformerFactory factory = TransformerFactory.newInstance();
InputStream iXsl =
Process.class.getClassLoader().getResourceAsStream(xsl);
StreamSource iSource = new StreamSource(iXsl);

Transformer foTrans = factory.newTransformer(iSource);

StreamSource strSourceXML = new StreamSource(new
ByteArrayInputStream(xml.getBytes()));
foTrans.transform(strSourceXML, new StreamResult(foOut));
foOut.flush();

ByteArrayOutputStream pdfOut = new ByteArrayOutputStream();
TransformerFactory tFactoryFO2PDF = 
TransformerFactory.newInstance();
Transformer pdfTrans = tFactoryFO2PDF.newTransformer();
FopFactory fopFactory = FopFactory.newInstance();
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, 
foUserAgent, pdfOut);
Result res = new SAXResult(fop.getDefaultHandler());
StreamSource streamSourceXml = new StreamSource(new
ByteArrayInputStream(foOut.toByteArray()));
pdfTrans.transform(streamSourceXml, res);

java.io.File file = new java.io.File("d:/res.pdf");
FileOutputStream foStream = new FileOutputStream(file);
pdfOut.writeTo(foStream);   


} catch(Exception e) {
e.printStackTrace();
}

return sResult;
}

private static boolean copyFile(InputStream in, OutputStream out) {
try {

int c;
while ((c = in.read()) != -1)
out.write(c);

in.close();
out.close();
} catch (IOException io) {
return false;
}
return true;
}


The code of my web service is just:

public static String process(String xml, String xsl) {
String sResult = null;

try {
sResult = Process.process(xml, xsl);
System.out.println("sss");
} catch(Exception e) {
e.printStackTrace();
}
return sResult;
}

The web service has the JAR of the Java application in his classpath. The
content of the Jar file is the following one:
  NamePath
briques.xsd  
logo.gif img\
Manifest.mf  meta-inf\
Process.class  tst
saxon-licence.lic  
xsl2.xslt

I call the web service with the following parameters:

xml = ""+
 ""+
""+

"Mastering EJB"+

"Ed Roman"+

"$45.00"+
""+
""+

"Design Patterns"+

"Erich Gamma"+

"$50.00"+
""+
   

Re: [ERROR] Image not found

2010-02-18 Thread philippe voncken
Hi,

you must implementing the UriResolver and set your fopFactory with it.

fopFactoy.setUriResolver()

regards,
Philippe

2010/2/18 pjmorce 

>
> 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 and it has a method "process". It works fine when
> called directly as a java application.
>
>  - I Created a simple web service that just call this "process" method of
> that class. However, when i call the web service, i get an error:
>"[ERROR] Image not found: img/logo.gif"
>=> The PDF is created but without the image.
>
> Here is the code of my Process.java class:
>
>  public static String process(String xml, String xsl) {
>String sResult = null;
>
>
>try {
>
>ByteArrayOutputStream foOut = new ByteArrayOutputStream();
>
>ByteArrayOutputStream bOut = new ByteArrayOutputStream();
>InputStream iss =
> Process.class.getClassLoader().getResourceAsStream(brique);
>copyFile(new BufferedInputStream(iss), bOut);
>
>SAXBuilder builder = new SAXBuilder();
>Document document = builder.build(new
> ByteArrayInputStream(xml.getBytes()));
>
>TransformerFactory factory =
> TransformerFactory.newInstance();
>InputStream iXsl =
> Process.class.getClassLoader().getResourceAsStream(xsl);
>StreamSource iSource = new StreamSource(iXsl);
>
>Transformer foTrans = factory.newTransformer(iSource);
>
>StreamSource strSourceXML = new StreamSource(new
> ByteArrayInputStream(xml.getBytes()));
>foTrans.transform(strSourceXML, new StreamResult(foOut));
>foOut.flush();
>
>ByteArrayOutputStream pdfOut = new ByteArrayOutputStream();
>TransformerFactory tFactoryFO2PDF =
> TransformerFactory.newInstance();
>Transformer pdfTrans = tFactoryFO2PDF.newTransformer();
>FopFactory fopFactory = FopFactory.newInstance();
>FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
>Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,
> foUserAgent, pdfOut);
>Result res = new SAXResult(fop.getDefaultHandler());
>StreamSource streamSourceXml = new StreamSource(new
> ByteArrayInputStream(foOut.toByteArray()));
>pdfTrans.transform(streamSourceXml, res);
>
>java.io.File file = new java.io.File("d:/res.pdf");
>FileOutputStream foStream = new FileOutputStream(file);
>pdfOut.writeTo(foStream);
>
>
>} catch(Exception e) {
>e.printStackTrace();
>}
>
>return sResult;
> }
>
> private static boolean copyFile(InputStream in, OutputStream out) {
>try {
>
>int c;
>while ((c = in.read()) != -1)
>out.write(c);
>
>in.close();
>out.close();
>} catch (IOException io) {
>return false;
>}
>return true;
> }
>
>
> The code of my web service is just:
>
> public static String process(String xml, String xsl) {
>String sResult = null;
>
>try {
>sResult = Process.process(xml, xsl);
>System.out.println("sss");
>} catch(Exception e) {
>e.printStackTrace();
>}
>return sResult;
> }
>
> The web service has the JAR of the Java application in his classpath. The
> content of the Jar file is the following one:
>  NamePath
> briques.xsd
> logo.gif img\
> Manifest.mf  meta-inf\
> Process.class  tst
> saxon-licence.lic
> xsl2.xslt
>
> I call the web service with the following parameters:
>
> xml = ""+
> ""+
>""+
>
>  "Mastering EJB"+
>
>  "Ed Roman"+
>
>  "$45.00"+
>""+
>""+
>
>  "Design Patterns"+
>
>  "Erich Gamma"+
>
>  "$50.00"+
>""+
>""+
>
>  "Effective Java"+
>
>  "Josch Bloch"+
>
>  "$30.00"+
>"" +
>"";
>
> xsl = "xsl2.xslt";
>
> In the xsl2.xslt I have a part of code like this to insert the image on the
> pdf:
> ...
> 
>  
> 
> ...
>
>
> The XSL is found in the JAR because the PDF file is generated. But the
> following error st

Re: [ERROR] Image not found

2010-02-18 Thread Venkat Reddy

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 mailto: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/):

 - 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 and it has a method "process". It works fine
when
called directly as a java application.

 - I Created a simple web service that just call this "process"
method of
that class. However, when i call the web service, i get an error:
   "[ERROR] Image not found: img/logo.gif"
   => The PDF is created but without the image.

Here is the code of my Process.java class:

 public static String process(String xml, String xsl) {
   String sResult = null;


   try {

   ByteArrayOutputStream foOut = new
ByteArrayOutputStream();

   ByteArrayOutputStream bOut = new
ByteArrayOutputStream();
   InputStream iss =
Process.class.getClassLoader().getResourceAsStream(brique);
   copyFile(new BufferedInputStream(iss), bOut);

   SAXBuilder builder = new SAXBuilder();
   Document document = builder.build(new
ByteArrayInputStream(xml.getBytes()));

   TransformerFactory factory =
TransformerFactory.newInstance();
   InputStream iXsl =
Process.class.getClassLoader().getResourceAsStream(xsl);
   StreamSource iSource = new StreamSource(iXsl);

   Transformer foTrans = factory.newTransformer(iSource);

   StreamSource strSourceXML = new StreamSource(new
ByteArrayInputStream(xml.getBytes()));
   foTrans.transform(strSourceXML, new
StreamResult(foOut));
   foOut.flush();

   ByteArrayOutputStream pdfOut = new
ByteArrayOutputStream();
   TransformerFactory tFactoryFO2PDF =
TransformerFactory.newInstance();
   Transformer pdfTrans = tFactoryFO2PDF.newTransformer();
   FopFactory fopFactory = FopFactory.newInstance();
   FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
   Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,
foUserAgent, pdfOut);
   Result res = new SAXResult(fop.getDefaultHandler());
   StreamSource streamSourceXml = new StreamSource(new
ByteArrayInputStream(foOut.toByteArray()));
   pdfTrans.transform(streamSourceXml, res);

   java.io.File file = new java.io.File("d:/res.pdf");
   FileOutputStream foStream = new FileOutputStream(file);
   pdfOut.writeTo(foStream);


   } catch(Exception e) {
   e.printStackTrace();
   }

   return sResult;
}

private static boolean copyFile(InputStream in, OutputStream out) {
   try {

   int c;
   while ((c = in.read()) != -1)
   out.write(c);

   in.close();
   out.close();
   } catch (IOException io) {
   return false;
   }
   return true;
}


The code of my web service is just:

public static String process(String xml, String xsl) {
   String sResult = null;

   try {
   sResult = Process.process(xml, xsl);
   System.out.println("sss");
   } catch(Exception e) {
   e.printStackTrace();
   }
   return sResult;
}

The web service has the JAR of the Java application in his
classpath. The
content of the Jar file is the following one:
 NamePath
briques.xsd
logo.gif img\
Manifest.mf  meta-inf\
Process.class  tst
saxon-licence.lic
xsl2.xslt

I call the web service with the following parameters:

xml = ""+
""+
 
 ""+
 
 "Mastering EJB"+
 
 "Ed Roman"+
 
 "$45.00"+
 
 ""+
 
 ""+
   

Re: [ERROR] Image not found

2010-02-18 Thread 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 attribute, which may be relative or absolute.
base - The base URI in effect when the href attribute was encountered.

If I am correct HRef is the filename. So my URIResolver will have
img/logo.gif as href parameter.

Correct?

And in the case that I dont know the name of my image indicated on the XSL?
how can I solve the problem?

thank you

regards



Philippe Voncken wrote:
> 
> Hi,
> 
> you must implementing the UriResolver and set your fopFactory with it.
> 
> fopFactoy.setUriResolver()
> 
> regards,
> Philippe
> 
> 2010/2/18 pjmorce 
> 
>>
>> 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 and it has a method "process". It works fine when
>> called directly as a java application.
>>
>>  - I Created a simple web service that just call this "process" method of
>> that class. However, when i call the web service, i get an error:
>>"[ERROR] Image not found: img/logo.gif"
>>=> The PDF is created but without the image.
>>
>> Here is the code of my Process.java class:
>>
>>  public static String process(String xml, String xsl) {
>>String sResult = null;
>>
>>
>>try {
>>
>>ByteArrayOutputStream foOut = new ByteArrayOutputStream();
>>
>>ByteArrayOutputStream bOut = new ByteArrayOutputStream();
>>InputStream iss =
>> Process.class.getClassLoader().getResourceAsStream(brique);
>>copyFile(new BufferedInputStream(iss), bOut);
>>
>>SAXBuilder builder = new SAXBuilder();
>>Document document = builder.build(new
>> ByteArrayInputStream(xml.getBytes()));
>>
>>TransformerFactory factory =
>> TransformerFactory.newInstance();
>>InputStream iXsl =
>> Process.class.getClassLoader().getResourceAsStream(xsl);
>>StreamSource iSource = new StreamSource(iXsl);
>>
>>Transformer foTrans = factory.newTransformer(iSource);
>>
>>StreamSource strSourceXML = new StreamSource(new
>> ByteArrayInputStream(xml.getBytes()));
>>foTrans.transform(strSourceXML, new StreamResult(foOut));
>>foOut.flush();
>>
>>ByteArrayOutputStream pdfOut = new
>> ByteArrayOutputStream();
>>TransformerFactory tFactoryFO2PDF =
>> TransformerFactory.newInstance();
>>Transformer pdfTrans = tFactoryFO2PDF.newTransformer();
>>FopFactory fopFactory = FopFactory.newInstance();
>>FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
>>Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,
>> foUserAgent, pdfOut);
>>Result res = new SAXResult(fop.getDefaultHandler());
>>StreamSource streamSourceXml = new StreamSource(new
>> ByteArrayInputStream(foOut.toByteArray()));
>>pdfTrans.transform(streamSourceXml, res);
>>
>>java.io.File file = new java.io.File("d:/res.pdf");
>>FileOutputStream foStream = new FileOutputStream(file);
>>pdfOut.writeTo(foStream);
>>
>>
>>} catch(Exception e) {
>>e.printStackTrace();
>>}
>>
>>return sResult;
>> }
>>
>> private static boolean copyFile(InputStream in, OutputStream out) {
>>try {
>>
>>int c;
>>while ((c = in.read()) != -1)
>>out.write(c);
>>
>>in.close();
>>out.close();
>>} catch (IOException io) {
>>return false;
>>}
>>return true;
>> }
>>
>>
>> The code of my web service is just:
>>
>> public static String process(String xml, String xsl) {
>>String sResult = null;
>>
>>try {
>>sResult = Process.process(xml, xsl);
>>System.out.println("sss");
>>} catch(Exception e) {
>>e.printStackTrace();
>>}
>>return sResult;
>> }
>>
>> The web service has the JAR of the Java application in his classpath. The
>> content of the Jar file is the following one:
>>  NamePath
>> briques.xsd
>> logo.gif img\
>> Manifest.mf  meta-inf\
>> Process.class  tst
>> saxon-licence.lic
>> xsl2.xslt
>>
>> I call the web service with the following parameters:
>>
>> xml = ""+
>> ""+
>>   

Re: [ERROR] Image not found

2010-02-18 Thread pjmorce

I tried your suggestion:

in the XSL I have now the following code and the problem remains:


  


However, i also tried to put this and it worked:


  


It worked, but obvious reasons I cannot put this on the XSL that will be on
production... :(



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
>

-- 
View this message in context: 
http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637052.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: [ERROR] Image not found

2010-02-18 Thread philippe voncken
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 resolve method return.

So you can put your image in the classpath and use as :

resolve(String href, String base) {
  return YourUriResolver.class.getResourceAsStream(href);
}

or :

public class SimpleUriResolver implements URIResolver {

/**
 * Instantiates a new fop uri resolver.
 */
public SimpleUriResolver() {
super();
}

/*
 * (non-Javadoc)
 * @see javax.xml.transform.URIResolver#resolve(java.lang.String,
java.lang.String)
 */
public Source resolve(String href, String base) throws
TransformerException {
Source src;
final String file = "file:";
if (href.startsWith(file)) {
src = new StreamSource(new File(href.substring(file.length(;
} else {
src = new
StreamSource(SimpleUriResolver.class.getResourceAsStream(href));
}
return src;
}

}

As you want :)

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 attribute, which may be relative or absolute.
> base - The base URI in effect when the href attribute was encountered.
>
> If I am correct HRef is the filename. So my URIResolver will have
> img/logo.gif as href parameter.
>
> Correct?
>
> And in the case that I dont know the name of my image indicated on the XSL?
> how can I solve the problem?
>
> thank you
>
> regards
>
>
>
> Philippe Voncken wrote:
> >
> > Hi,
> >
> > you must implementing the UriResolver and set your fopFactory with it.
> >
> > fopFactoy.setUriResolver()
> >
> > regards,
> > Philippe
> >
> > 2010/2/18 pjmorce 
> >
> >>
> >> 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 and it has a method "process". It works fine when
> >> called directly as a java application.
> >>
> >>  - I Created a simple web service that just call this "process" method
> of
> >> that class. However, when i call the web service, i get an error:
> >>"[ERROR] Image not found: img/logo.gif"
> >>=> The PDF is created but without the image.
> >>
> >> Here is the code of my Process.java class:
> >>
> >>  public static String process(String xml, String xsl) {
> >>String sResult = null;
> >>
> >>
> >>try {
> >>
> >>ByteArrayOutputStream foOut = new
> ByteArrayOutputStream();
> >>
> >>ByteArrayOutputStream bOut = new ByteArrayOutputStream();
> >>InputStream iss =
> >> Process.class.getClassLoader().getResourceAsStream(brique);
> >>copyFile(new BufferedInputStream(iss), bOut);
> >>
> >>SAXBuilder builder = new SAXBuilder();
> >>Document document = builder.build(new
> >> ByteArrayInputStream(xml.getBytes()));
> >>
> >>TransformerFactory factory =
> >> TransformerFactory.newInstance();
> >>InputStream iXsl =
> >> Process.class.getClassLoader().getResourceAsStream(xsl);
> >>StreamSource iSource = new StreamSource(iXsl);
> >>
> >>Transformer foTrans = factory.newTransformer(iSource);
> >>
> >>StreamSource strSourceXML = new StreamSource(new
> >> ByteArrayInputStream(xml.getBytes()));
> >>foTrans.transform(strSourceXML, new StreamResult(foOut));
> >>foOut.flush();
> >>
> >>ByteArrayOutputStream pdfOut = new
> >> ByteArrayOutputStream();
> >>TransformerFactory tFactoryFO2PDF =
> >> TransformerFactory.newInstance();
> >>Transformer pdfTrans = tFactoryFO2PDF.newTransformer();
> >>FopFactory fopFactory = FopFactory.newInstance();
> >>FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
> >>Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,
> >> foUserAgent, pdfOut);
> >>Result res = new SAXResult(fop.getDefaultHandler());
> >>StreamSource streamSourceXml = new StreamSource(new
> >> ByteArrayInputStream(foOut.toByteArray()));
> >>pdfTrans.transform(streamSourceXml, res);
> >>
> >>java.io.File file = new java.io.File("d:/res.pdf");
> >>FileOutputStream foStream = new FileOutputStream(file)

AW: [ERROR] Image not found

2010-02-18 Thread Georg Datterl
Hi pjmorce,

Assuming TstFOP.jar is on the server and found by your application server, what 
happens if you use


  



Mit freundlichen Grüßen

Georg Datterl

-- Kontakt --

Georg Datterl

Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg

HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20

www.geneon.de

Weitere Mitglieder der Willmy MediaGroup:

IRS Integrated Realization Services GmbH:www.irs-nbg.de
Willmy PrintMedia GmbH:www.willmy.de
Willmy Consult & Content GmbH: www.willmycc.de


-Ursprüngliche Nachricht-
Von: pjmorce [mailto:pjcarva...@gmail.com]
Gesendet: Donnerstag, 18. Februar 2010 11:47
An: fop-users@xmlgraphics.apache.org
Betreff: Re: [ERROR] Image not found


I tried your suggestion:

in the XSL I have now the following code and the problem remains:


  


However, i also tried to put this and it worked:


  


It worked, but obvious reasons I cannot put this on the XSL that will be on
production... :(



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
>

--
View this message in context: 
http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637052.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: [ERROR] Image not found

2010-02-18 Thread philippe voncken
Sorry, with this xsl it'll work in root element classpath :


 


Philippe

2010/2/18 philippe voncken 

> With my SimpleUriResolver() you must use xsl as follow:
>
> 
>  
> 
>
> if logo.gif is in your classpath root element, it will work.
>
> Philippe
>
> 2010/2/18 Georg Datterl 
>
> Hi pjmorce,
>>
>> Assuming TstFOP.jar is on the server and found by your application server,
>> what happens if you use
>>
>> 
>>  
>> 
>>
>>
>> Mit freundlichen Grüßen
>>
>> Georg Datterl
>>
>> -- Kontakt --
>>
>> Georg Datterl
>>
>> Geneon media solutions gmbh
>> Gutenstetter Straße 8a
>> 90449 Nürnberg
>>
>> HRB Nürnberg: 17193
>> Geschäftsführer: Yong-Harry Steiert
>>
>> Tel.: 0911/36 78 88 - 26
>> Fax: 0911/36 78 88 - 20
>>
>> www.geneon.de
>>
>> Weitere Mitglieder der Willmy MediaGroup:
>>
>> IRS Integrated Realization Services GmbH:www.irs-nbg.de
>> Willmy PrintMedia GmbH:www.willmy.de
>> Willmy Consult & Content GmbH: www.willmycc.de
>>
>>
>> -Ursprüngliche Nachricht-
>> Von: pjmorce [mailto:pjcarva...@gmail.com]
>> Gesendet: Donnerstag, 18. Februar 2010 11:47
>> An: fop-users@xmlgraphics.apache.org
>> Betreff: Re: [ERROR] Image not found
>>
>>
>> I tried your suggestion:
>>
>> in the XSL I have now the following code and the problem remains:
>>
>> 
>>  
>> 
>>
>> However, i also tried to put this and it worked:
>>
>> 
>>  >
>> src="jar:file:///D:/eclipse_galileo/eclipse/TstFOP/TstFOP.jar!/img/logo.gif"/>
>> 
>>
>> It worked, but obvious reasons I cannot put this on the XSL that will be
>> on
>> production... :(
>>
>>
>>
>> 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
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637052.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>
>>
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>
>>
>


Re: [ERROR] Image not found

2010-02-18 Thread philippe voncken
With my SimpleUriResolver() you must use xsl as follow:


 


if logo.gif is in your classpath root element, it will work.

Philippe

2010/2/18 Georg Datterl 

> Hi pjmorce,
>
> Assuming TstFOP.jar is on the server and found by your application server,
> what happens if you use
>
> 
>  
> 
>
>
> Mit freundlichen Grüßen
>
> Georg Datterl
>
> -- Kontakt --
>
> Georg Datterl
>
> Geneon media solutions gmbh
> Gutenstetter Straße 8a
> 90449 Nürnberg
>
> HRB Nürnberg: 17193
> Geschäftsführer: Yong-Harry Steiert
>
> Tel.: 0911/36 78 88 - 26
> Fax: 0911/36 78 88 - 20
>
> www.geneon.de
>
> Weitere Mitglieder der Willmy MediaGroup:
>
> IRS Integrated Realization Services GmbH:www.irs-nbg.de
> Willmy PrintMedia GmbH:www.willmy.de
> Willmy Consult & Content GmbH: www.willmycc.de
>
>
> -Ursprüngliche Nachricht-
> Von: pjmorce [mailto:pjcarva...@gmail.com]
> Gesendet: Donnerstag, 18. Februar 2010 11:47
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: [ERROR] Image not found
>
>
> I tried your suggestion:
>
> in the XSL I have now the following code and the problem remains:
>
> 
>  
> 
>
> However, i also tried to put this and it worked:
>
> 
>  
> src="jar:file:///D:/eclipse_galileo/eclipse/TstFOP/TstFOP.jar!/img/logo.gif"/>
> 
>
> It worked, but obvious reasons I cannot put this on the XSL that will be on
> production... :(
>
>
>
> 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
> >
>
> --
> View this message in context:
> http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637052.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: [ERROR] Image not found

2010-02-18 Thread pjmorce

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() { 
public Source resolve(String href, String base) throws
TransformerException { 
  return new StreamSource(getClass().getClassLoader
().getResourceAsStream(href)); 
} 
  });

Thanks again. 

Best regards.



Philippe Voncken wrote:
> 
> With my SimpleUriResolver() you must use xsl as follow:
> 
> 
>  
> 
> 
> if logo.gif is in your classpath root element, it will work.
> 
> Philippe
> 
> 2010/2/18 Georg Datterl 
> 
>> Hi pjmorce,
>>
>> Assuming TstFOP.jar is on the server and found by your application
>> server,
>> what happens if you use
>>
>> 
>>  
>> 
>>
>>
>> Mit freundlichen Grüßen
>>
>> Georg Datterl
>>
>> -- Kontakt --
>>
>> Georg Datterl
>>
>> Geneon media solutions gmbh
>> Gutenstetter Straße 8a
>> 90449 Nürnberg
>>
>> HRB Nürnberg: 17193
>> Geschäftsführer: Yong-Harry Steiert
>>
>> Tel.: 0911/36 78 88 - 26
>> Fax: 0911/36 78 88 - 20
>>
>> www.geneon.de
>>
>> Weitere Mitglieder der Willmy MediaGroup:
>>
>> IRS Integrated Realization Services GmbH:www.irs-nbg.de
>> Willmy PrintMedia GmbH:www.willmy.de
>> Willmy Consult & Content GmbH: www.willmycc.de
>>
>>
>> -Ursprüngliche Nachricht-
>> Von: pjmorce [mailto:pjcarva...@gmail.com]
>> Gesendet: Donnerstag, 18. Februar 2010 11:47
>> An: fop-users@xmlgraphics.apache.org
>> Betreff: Re: [ERROR] Image not found
>>
>>
>> I tried your suggestion:
>>
>> in the XSL I have now the following code and the problem remains:
>>
>> 
>>  
>> 
>>
>> However, i also tried to put this and it worked:
>>
>> 
>>  >
>> src="jar:file:///D:/eclipse_galileo/eclipse/TstFOP/TstFOP.jar!/img/logo.gif"/>
>> 
>>
>> It worked, but obvious reasons I cannot put this on the XSL that will be
>> on
>> production... :(
>>
>>
>>
>> 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
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637052.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>
>>
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>>
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/-ERROR--Image-not-found-tp27636263p27637247.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: How to balance table columns?

2010-02-18 Thread lexa2009

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 extension for it.
> I do see that balancing columns is part of next FO spec (I think 2.0).
> 
> Sorry couldn't be much more help.
> 
> Marijan (Mario) Madunic
> Publishing Specialist
> New Flyer Industries
> 
> -Original Message-
> From: lexa2009 [mailto:myworkac...@gmail.com] 
> Sent: Thursday, February 11, 2010 8:26 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: How to balance table columns?
> 
> 
> thx. yes, but i also need to know the length of each string, the length in
> mm
> of each character, the length of column to know when they break in two or
> more lines :) i think is is possible in automatic mode :)
> 
> 
> 
> Mario Madunic wrote:
>> 
>> Sorry for it to make more sense here is the xpath I would test
>> 
>> $var/child::*[position() lt count($var//child::*)/2 + 1]
>> $var/child::*[position() gt count($var//child::*)/2]
>> 
>> Marijan (Mario) Madunic
>> Publishing Specialist
>> New Flyer Industries
>> 
>> -Original Message-
>> From: Mario Madunic [mailto:mario_madu...@newflyer.com] 
>> Sent: Wednesday, February 10, 2010 6:50 AM
>> To: fop-users@xmlgraphics.apache.org
>> Subject: RE: How to balance table columns?
>> 
>> You might want to post this up on the XSLT list.
>> 
>> So here is how I would do it
>> 
>> First is create a temp node variable containing all the left and right
>> strings as child of the var. Get a count of the child nodes (left and
>> right) divide by two (round up or down your choice) then create the table
>> and copy-of/apply-templates to child::*[position() lt half + 1] and for
>> the right side child::*[position() gt half] in the left and right table
>> cells accordingly. Now that is not exact without testing and is only an
>> outline but I hope it give you a general idea of how it might be done.
>> 
>> Marijan (Mario) Madunic
>> Publishing Specialist
>> New Flyer Industries
>> 
>> -Original Message-
>> From: lexa2009 [mailto:myworkac...@gmail.com] 
>> Sent: Wednesday, February 10, 2010 5:59 AM
>> To: fop-users@xmlgraphics.apache.org
>> Subject: How to balance table columns?
>> 
>> 
>> Hello!
>> for example i have a simple table with 2 columns. like this:
>> 
>> leftstring1  rightstring1
>> leftstring2  rightstring2
>> leftstring3  rightstring3
>> leftstring4  rightstring4
>> leftstring5
>> leftstring6
>> 
>> i do not know how many of each string will be, but i want this table
>> 
>> leftstring1  leftstring6
>> leftstring2  rightstring1
>> leftstring3  rightstring2
>> leftstring4  rightstring3
>> leftstring5  rightstring4
>> 
>> how to balance columns? how to make table of smallest height?
>> -- 
>> View this message in context:
>> http://old.nabble.com/How-to-balance-table-columns--tp27530072p27530072.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>> 
>> 
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>> 
>> 
>> 
>> Please consider the environment before printing this e-mail.
>> 
>> CONFIDENTIALITY STATEMENT: This communication (and  any and all
>> information or material transmitted with this communication) is
>> confidential, may be privileged and is intended only for the use of the
>> intended recipient. If you are not the intended recipient, any review,
>> retransmission, circulation, distribution, reproduction, conversion to
>> hard copy, copying or other use of this communication, information or
>> material is strictly prohibited and may be illegal. If you received this
>> communication in error or if it is forwarded to you without the express
>> authorization of New Flyer, please notify us immediately by telephone or
>> by return email and permanently delete the communication, information and
>> material from any computer, disk drive, diskette or other storage device
>> or media. Thank you.
>> 
>> 
>> -
>> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>> 
>> 
>> 
>> Please consider the environment before printing this e-mail.
>> 
>> CONFIDENTIALITY STATEMENT: This communication (and  any and all
>> information or material transmitted with this communication) is
>> confidential, may be privileged and is intended only for the use of the
>> intended recipient. If you are not the intended recipient, any review,
>> retransmission, circulation, distribution,

Extremely long time for processing some kind of tif in rtf.

2010-02-18 Thread lexa2009

hello. i use fop.
i have this xsl-fo:

http://www.w3.org/1998/Math/MathML";
xmlns:fo="http://www.w3.org/1999/XSL/Format";>






















and i have this TIF
http://old.nabble.com/file/p27637399/0004.tif 0004.tif 

it takes 5 minutes to get RTF. 
if i make PDF it is fast, about 5 seconds.
if i reconvert tif it will work fast, but i have to use this kind of tif.
can u help me?
-- 
View this message in context: 
http://old.nabble.com/Extremely-long-time-for-processing-some-kind-of-tif-in-rtf.-tp27637399p27637399.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: XMLFilterImpl producing SVG instream-foreign-object

2010-02-18 Thread Raphael Parree
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  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 result in
> the FO tree: In this case i can not use that because the XML of the SVG
> needs to be parsed
>
> String svgText = umlDiagramProducer.produceSVGText(s);
>
> super.startElement(FONS, "instream-foreign-object",
> "fo:instream-foreign-object", attributes);
> //what am i going to put here???
> super.endElement(FONS, "instream-foreign-object",
> "fo:instream-foreign-object");
>
>
> I tried super.parse(new InputSource(new StringReader(svgText)));
> and a new SAXParser passing the parent contenthandler, but all results in
> exceptions.
>
> Thanks!
> --
> Raphael Parree
>
>


-- 
Raphael Parree
CTO
SOA Evangelist

phone +33 673 75 34 62
Disclaimer...
"The information contained in this message may be confidential and is
intended to be exclusively for the addressee. Sender's written permission is
needed prior to forwarding or otherwise using the content of the message,
whether completely or partially. Should you receive this message
unintentionally, please do not use the contents herein and notify the sender
immediately by return e-mail. Please rely on your own virus checking, no
responsibility is taken by the sender for any damage rising out of any bug
or virus infection."


Table cell, vertical alignment with text and Instream

2010-02-18 Thread Jeandur

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, it doesn't work. Only the Instream
object is centered and the text is bottom aligned.


Following the code I'm using :


  

   Some text vertical centered



  

  

  

  

  



  Some text with instream centered
  ?
  

  

  
 

  


This is very annoying for us, because it seemed to work with fop025 :-(

Any suggestions or advice will be armed welcome !
Thanks in advance.
Jean
-- 
View this message in context: 
http://old.nabble.com/Table-cell%2C-vertical-alignment-with-text-and-Instream-tp27637607p27637607.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Table cell, vertical alignment with text and Instream

2010-02-18 Thread Pascal Sancho
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 object (the
fo:instream-object in your case) with appropriate properties:
either alignment-adjust or the shorthand vertical-align.

HTH,
Pascal

Jeandur a écrit :
> 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, it doesn't work. Only the Instream
> object is centered and the text is bottom aligned.
>
>
> Following the code I'm using :
> 
> 
>   
>  border-style="solid">
>Some text vertical centered
> 
>
>  border-style="solid">
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>
>  border-style="solid">
>   Some text with instream centered
>   ?
>   
> 
>   
> 
>   
>  
> 
>   
> 
> 
> This is very annoying for us, because it seemed to work with fop025 :-(
>
> Any suggestions or advice will be armed welcome !
> Thanks in advance.
> Jean
>   


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Table cell, vertical alignment with text and Instream

2010-02-18 Thread Venkat Reddy

Hi,

If you keep the third cell elements in another table, then it should work.

Third cell should be 

border-style="solid">

 
 
   
 
   
 Some text with instream centered
   
   
 
   
 
   
 
   
 
   
 
   
   
   
   
 
   

If you replace the above xsl:fo script with your third cell, it should 
work as you expected.


Venkat.

Jeandur wrote:

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, it doesn't work. Only the Instream
object is centered and the text is bottom aligned.


Following the code I'm using :


  

   Some text vertical centered



  

  

  

  

  



  Some text with instream centered
  ?
  

  

  
 

  


This is very annoying for us, because it seemed to work with fop025 :-(

Any suggestions or advice will be armed welcome !
Thanks in advance.
Jean
  



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Table cell, vertical alignment with text and Instream

2010-02-18 Thread philippe voncken
Hi,

you can also uses a text-align attribute on the block element.

Philippe

2010/2/18 Venkat Reddy 

> Hi,
>
> If you keep the third cell elements in another table, then it should work.
>
> Third cell should be 
>
>
>  border-style="solid">
> 
> 
>
>   
> 
>   
> Some text with instream centered
>
>   
>   
> 
>   
> 
>   
> 
>   
> 
>   
> 
>   
>   
>   
>   
>
> 
>   
>
> If you replace the above xsl:fo script with your third cell, it should work
> as you expected.
>
> Venkat.
>
>
> Jeandur wrote:
>
>> 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, it doesn't work. Only the Instream
>> object is centered and the text is bottom aligned.
>>
>>
>> Following the code I'm using :
>> 
>>
>>  
>>> border-style="solid">
>>   Some text vertical centered
>>
>>
>>> border-style="solid">
>>  
>>
>>  
>>
>>  
>>
>>  
>>
>>  
>>
>>
>>> border-style="solid">
>>  Some text with instream centered
>>  ?
>>  
>>
>>  
>>
>>  
>> 
>>
>>  
>>
>> 
>> This is very annoying for us, because it seemed to work with fop025 :-(
>>
>> Any suggestions or advice will be armed welcome !
>> Thanks in advance.
>> Jean
>>
>>
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Re: Table cell, vertical alignment with text and Instream

2010-02-18 Thread jean.duracel
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 attribute on the block element.
> Philippe
>
> 2010/2/18 Venkat Reddy 
> Hi,
>
> If you keep the third cell elements in another table, then it should work.
>
> Third cell should be 
>
>
>                
>         
>          
>                    
>              
>                     Some text with instream centered
>              
>              
>                    
>                      
>                            
>                          
>                            
>                          
>                            
>                          
>                    
>              
>              
>          
>       
>        
>              
>
> If you replace the above xsl:fo script with your third cell, it should work 
> as you expected.
> 
> Venkat.
>
> Jeandur wrote:
> 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, it doesn't work. Only the Instream
> object is centered and the text is bottom aligned.
>
>
> Following the code I'm using :
> 
>            
>              
>                
> border-style="solid">
>                   Some text vertical centered
>                
>
>                
> border-style="solid">
>                  
>                    
>                      
>                        
>                          
>                        
>                      
>                    
>                  
>                
>
>                
> border-style="solid">
>                  Some text with instream centered
>                  ?
>                      
>                        
>                          
>                        
>                      
>                    
>                
>              
>            
> 
> This is very annoying for us, because it seemed to work with fop025 :-(
>
> Any suggestions or advice will be armed welcome !
> Thanks in advance.
> Jean
>  
> 
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
> 
> 

Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net
<>
-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Re: Table cell, vertical alignment with text and Instream

2010-02-18 Thread jean.duracel

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 : fop-users@xmlgraphics.apache.org
> Copie à :
> Objet : Re: Table cell, vertical alignment with text and Instream
>
>
> Hi,
>
> If you keep the third cell elements in another table, then it should work.
>
> Third cell should be 
>
>
> border-style="solid">
>
>
>
>
>
> Some text with instream centered
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> If you replace the above xsl:fo script with your third cell, it should
> work as you expected.
>
> Venkat.
>
> Jeandur wrote:
> > 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, it doesn't work. Only the Instream
> > object is centered and the text is bottom aligned.
> >
> >
> > Following the code I'm using :
> > 
> >
> >
> >
> > border-style="solid">
> > Some text vertical centered
> >
> >
> >
> > border-style="solid">
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > border-style="solid">
> > Some text with instream centered
> > ?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 
> > This is very annoying for us, because it seemed to work with fop025 :-(
> >
> > Any suggestions or advice will be armed welcome !
> > Thanks in advance.
> > Jean
> >
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>
> 

Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net


Re: Table cell, vertical alignment with text and Instream

2010-02-18 Thread jean.duracel
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 possibility to put the vertical-align in 
place ...

Any chance to get this behavior from attributes put on the cell only ?


Jean

> Message du 18/02/10 14:52
> De : "Pascal Sancho"
> A : "fop-users@xmlgraphics.apache.org"
> Copie à :
> Objet : Re: Table cell, vertical alignment with text and Instream
>
>
> 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 object (the
> fo:instream-object in your case) with appropriate properties:
> either alignment-adjust or the shorthand vertical-align.
>
> HTH,
> Pascal
>
> Jeandur a écrit :
> > 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, it doesn't work. Only the Instream
> > object is centered and the text is bottom aligned.
> >
> >
> > Following the code I'm using :
> > 
> >
> >
> >
> > border-style="solid">
> > Some text vertical centered
> >
> >
> >
> > border-style="solid">
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > border-style="solid">
> > Some text with instream centered
> > ?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 
> > This is very annoying for us, because it seemed to work with fop025 :-(
> >
> > Any suggestions or advice will be armed welcome !
> > Thanks in advance.
> > Jean
> >
>
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>
> 

Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net


Re: Table cell, vertical alignment with text and Instream

2010-02-18 Thread Pascal Sancho
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 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 possibility to put the
> vertical-align in place ...
> Any chance to get this behavior from attributes put on the cell only ?
>
>
> Jean
>
> > Message du 18/02/10 14:52
> > De : "Pascal Sancho"
> >
> > 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 object (the
> > fo:instream-object in your case) with appropriate properties:
> > either alignment-adjust or the shorthand vertical-align.
> >
> > HTH,
> > Pascal
> >
> > Jeandur a écrit :
> > > 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, it doesn't work. Only
> the Instream
> > > object is centered and the text is bottom aligned.
> > > Following the code I'm using :
> > > border-style="solid">
> > > Some text vertical centered
> > > border-style="solid">
> > > border-style="solid">
> > > Some text with instream centered
> > > ?
> > > This is very annoying for us, because it seemed to work with
> fop025 :-(
> > >
> > > Any suggestions or advice will be armed welcome !
> > > Thanks in advance.
> > > Jean
>


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Table cell, vertical alignment with text and Instream

2010-02-18 Thread Pascal Sancho
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 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 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 possibility to put the
>> vertical-align in place ...
>> Any chance to get this behavior from attributes put on the cell only ?
>>
>>
>> Jean
>>
>> > Message du 18/02/10 14:52
>> > De : "Pascal Sancho"
>> >
>> > 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 object (the
>> > fo:instream-object in your case) with appropriate properties:
>> > either alignment-adjust or the shorthand vertical-align.
>> >
>> > HTH,
>> > Pascal
>> >
>> > Jeandur a écrit :
>> > > 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, it doesn't work. Only
>> the Instream
>> > > object is centered and the text is bottom aligned.
>> > > Following the code I'm using :
>> > > border-style="solid">
>> > > Some text vertical centered
>> > > border-style="solid">
>> > > border-style="solid">
>> > > Some text with instream centered
>> > > ?
>> > > This is very annoying for us, because it seemed to work with
>> fop025 :-(
>> > >
>> > > Any suggestions or advice will be armed welcome !
>> > > Thanks in advance.
>> > > Jean
>> 


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Flowing absolute positioned block-containers

2010-02-18 Thread Stuart Scott
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 findings

Kind regards
 
Stuart Scott

-Original Message-
From: Vincent Hennebert [mailto:vhenneb...@gmail.com] 
Sent: 15 February 2010 11:01
To: fop-users@xmlgraphics.apache.org
Subject: Re: Flowing absolute positioned block-containers


Hi Stuart,

Just enclose your construct in another fo:block-container and that
should do it.

Absolute positioning is done WRT the nearest ancestor 'reference area',
which fo:block-container appears to generate. If you put your block
containers as direct children of fo:flow, they will be positioned within
the page. If you enclose them with a non absolutely-positioned
fo:block-container, they will be placed within that block-container,
which will itself flow on the page.

HTH,
Vincent


Stuart Scott wrote:
> Sorry, the end of the sentence should have read:
>  
> This relies heavily on positioning within the parent.  However, I need

> this to move depending on other content down the page and possibly 
> onto the next page as necessary.  I have tried placing this within a 
> table but it obviously does not move as the position is absolute.  I 
> have tried using absolute-position="static" but then I lose the 
> ability to specify the dimensions of the block, plus I could not get 
> it to work.
> 
>   -Original Message-
>   From: Stuart Scott 
>   Sent: 12 February 2010 11:11
>   To: fop-users@xmlgraphics.apache.org
>   Subject: Flowing absolute positioned block-containers
>   
>   
>   The following code (which has been cut down to use as an
> example) uses two circles onto a block container to create the 
> illusion of a table with space between the two circles (see attached):
>
>  top="1cm" width="17cm" height="1.3cm" background-color="red">
>   font-size="6">   
> 
>  top="0.56cm">  
>   font-weight="bold" color="#0A3548">
>
>   http://www.w3.org/2000/svg";
> height="500" width="500" viewBox="-50 -50 100 100">
>
>
>  
>  
> 
>  top="0.6cm">  
>   font-weight="bold" color="#0A3548">
>   
> http://www.w3.org/2000/svg";
> height="500" width="500" viewBox="-50 -50 100 100">
>  
>  
>
>
>  
>
>   This relies heavily on positioning within the parent.  However,
I 
> need this to move depending on other content down the page and 
> possibly onto the next page as necessary.  I have tried placing this 
> within a table but it obviously does not move as the position is 
> absolute.  I have tried
>
>   Can anyone tell me if this is the best way of achieving this and

> indeed if this is possible?
>
>   I am currently using FOP 0.93 and can't upgrade at this time.
>
>   Kind regards
>
>   Stuart Scott
>   For email disclaimer details please click or visit - 
> http://www.countrywideplc.co.uk/disclaimer
> 
> 

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org