Re: external-graphic size in PDF

2006-04-07 Thread Chris Bowditch

Will Peterson wrote:

snip/


fo:external-graphic height=300px src=myImage.jpg/
 
Using FOP .2 the image comes out perfect, resized to a width of 300 
pixels.  The newer FOP, however, does not resize the image causing (in 
my case) the image to be bigger than the virtual PDF paper it is 
rendered on.


In FOP 0.91beta, if you want your image to be scaled I think you need to 
specify content-width and content-height as well as width and height.


Chris



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



Re: Return carriage

2006-04-07 Thread Jeremias Maerki
(Following up on fop-users. Questions should go there. Thank you!)

If you don't give FOP a chance for a line break, it won't break. Put a
space or a zero-width-space after each comma.

On 06.04.2006 19:54:07 Luis Fabiano wrote:
 
 Hello all,
 
 I started to develop using embebbed FOP just recently and I´m having a
 problem in a report.
 
 The case is that one block field just don´t break the line when the text
 inside (dinamically loaded) is higher than the page width. Follow the code
 I´m using:
 
 fo:block wrap-option=wrap 
   #if ($testInfo.HBM_Method == TEST) 
 #foreach( $test in $testResults )
   $test.VoltageRanges 
 #end
   #else
 $summary.TestVoltages
   #end 
 /fo:block
 
 The result I expect was a line like that
 
 1000,1001,1002,1003,1004,1005...and go on
 
 But the line just continue as the end of the page simply don´t exist :-o


Jeremias Maerki


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



Re: Improve image quality SVG to PDF ( XSL-FO)

2006-04-07 Thread Mathieu Leplatre

I was using 0.20.5
...I am now using 0.91 with FOUserAgent methods, and it works great, my 
images come out well !

Thanks !

Jeremias Maerki wrote:

On 06.04.2006 16:24:09 Mathieu Leplatre wrote:
  

I read the explanation about graphics resolution here :
http://xmlgraphics.apache.org/fop/0.20.5/graphics.html#resolution



You reference the 0.20.5 documentation. Earlier you talked about a 0.92
changelog but there's no version 0.92, yet. Which FOP version are you
using exactly?

  
but it doesn't explain how to get an higher resolution when the SVG is 
embedded in a  fo:instream-foreign-object


SVG images will then be defined as
image xlink:href=... x=38 y=29 width=43 height=37 id=img/
with both height and width

Images quality is extremely poor (my images are 1200dpi...which is fine 
enough).

An example is here :
http://leplatre.free.fr/pub/qcaa.png

How could I get better results ?



If you use the latest release (0.91beta or later) you can use the
target-resolution option in the configuration file or in the FOUserAgent
to improve the resolution of your images. It's described here:
http://xmlgraphics.apache.org/fop/latest/configuration.html
and here:
http://xmlgraphics.apache.org/fop/latest/embedding.html#config-internal


Jeremias Maerki


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


  


--
Mathieu Leplatre
Météo France International
GSM: +974 579 3608
Fax: +974 436 5086


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



Re: Arabic characters position ( SVG to PDF )

2006-04-07 Thread Jeremias Maerki
On the other side, your arabic.svg example doesn't display in either
Adobe SVG Reader or Firefox. Looking closely at the SVG itself, I see
that there's writing-mode:lr-tb which is certainly wrong for Arabic
text. I think the problem's in Inkscape, not in Batik or FOP. If you
manually remove the writing-mode from the tspan and instead specify
writing-mode:rl-tb on the text element and use Arial instead of
Bitstream Vera Sans (which is not on my machine), then the SVG displays
correctly in Adobe SVG Reader and Batik Squiggle.

On 07.04.2006 10:46:59 Mathieu Leplatre wrote:
 I tried the PDFTranscoder (0.20.5 and 0.91b) and had the same problems...
 The words are still misplaced.
 (I guess Squiggle suffer the same problems then...)
 
 Here is how it comes out :
 http://leplatre.free.fr/pub/arabicmisplaced.png
 
 I couldn't find any method of the FOUserAgent (or any XMLHandler class 
 to add neither) to disable PDFTextPainter with XSL-FO programmatically.
 
 Thanks you so much for your help so far
 
 Mathieu.
 
 Jeremias Maerki wrote:
  You can also convert SVG to PDF directly by using Apache Batik's
  Transcoder API. For PDF you can use the class
  org.apache.fop.svg.PDFTranscoder.
 
  See:
  http://xmlgraphics.apache.org/batik/rasterizerTutorial.html
 
  The example here is not the same as the one you reported the problem for.
  The SVG looks fine in Batik's Squiggle (the SVG browser) and in Acrobat
  Reader when generated with FOP's PDFTranscoder.
 
  The configuration file I'm talking about is described here:
  http://xmlgraphics.apache.org/fop/latest/configuration.html
 
 
  On 06.04.2006 15:59:48 Mathieu Leplatre wrote:

  I use XSL-FO because I didn't know there was another way to do it.
 
  Here is a svg file :
  leplatre.free.fr/pub/arabic.svg
 
  Here is the XSL I made :
  http://leplatre.free.fr/pub/embed.xsl
 
  ...sorry my question will sound stupid but in which configuration file 
  can I put this xml-handler tag ?
 
  Thank you Jeremias for your extremely fast reaction time !
 
  Jeremias Maerki wrote:
  
  It could be a flaw in the PDFTextPainter. If you provide a sample SVG
  file I can verify that. You don't say if you're converting through the
  PDFTranscoder or via XSL-FO. If you go via XSL-FO you can set:
 
xml-handler namespace=http://www.w3.org/2000/svg;
  stroke-texttrue/stroke-text
/xml-handler
 
  ...as a direct child of the renderer element for the PDF renderer in
  the configuration file.
 
  The PDFTranscoder currently doesn't support disabling the PDFTextPainter.
 
  Note: The above is only tested on the latest FOP Trunk. I can't
  guarantee without verifying if 0.91beta behaves the same way.
 
  On 06.04.2006 15:27:58 Mathieu Leplatre wrote:


  Hi all,
 
  I use fop to convert SVG files to PDF.
 
  My SVG contains UTF8 strings in arabic (direction right to left).
  Encoding and such characters are supported but the words are misplaced 
  (it looks like the origin (x,y) is placed at ( x + lenght, y ).
 
  Here is an example to figure it out :
  http://leplatre.free.fr/pub/examplearabic.png
 
  Is it a known bug ? I didn't see anything about this in 0.92 change 
  log...
 
  Does someone know a trick for this ?
  


Jeremias Maerki


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



Apache Jar Question

2006-04-07 Thread Dirk Bromberg

Hi all,

short question:

is it allowed to extract the files from some apache jar and build one 
big jar?


Thanks

Dirk

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



Re: Still struggling with document(), formatting

2006-04-07 Thread Gosselin, Michael
 

 -Original Message-
 From: Manuel Mall [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 06, 2006 6:40 PM
 To: fop-users@xmlgraphics.apache.org
 Subject: [SPAM] Re: Still struggling with document(), formatting
 
 On Friday 07 April 2006 04:14, Gosselin, Michael wrote:
  When I use the original xsl (PrintFormat.xsl) file with fop 
  (on a Unix  machine, and how do I determine the version?), ...

 Michael,
 
 you see the FOP version below: '[INFO] FOP 0.20.5'.

Well, that was pretty obvious.  [slaps head]

 It appear your xslt conversion doesn't produce a valid xsl-fo 
 file, e.g you seem to give html tags like div, tr, ... to 
 FOP which FOP of course doesn't understand.  How about you 
 just run the stylesheet conversion on its own, e.g. use xalan 
 from the command line to convert your xml file into an xsl-fo 
 file and then check if the output is valid xsl-fo? At this 
 point in time I think your problems have very little to do 
 with FOP itself.
 
 Manuel

Thanks; I'll see if that works, but the problem is the original XSLT
(PrintFormat.xsl) was generated by the same people who send me the XML file;
I'll see what they can do.  The modified XSLT (AthenaFormat.xsl) is what I'm
working on.

I suspect the file was created using Microsoft products, which means there's
probably more to the file than what's needed.  ;)

Michael 

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



Re: Still struggling with document(), formatting

2006-04-07 Thread Johannes Küpnsebeck
Hi Michael,
the PrintFormat.xsl is buggy, too, it creates html and rr namespaced
elements, one example:

xsl:copy-of select=//rr:CPatFile/rr:[EMAIL PROTECTED]'header']/

This means copy all elements directly to the fo output, including html
and rr elements.

I think you're doing two jobs at once with the stylesheet: information
retrieval and formatting.
Maybe its easier to split this: make one stylesheet that extracts all
information from the xml (and  merge it with the ClientInfo.xml via
document() ) and writes it as a simpler xml-file in your own
intermediate format, then write a stylesheet that does only the
fop-stuff of the intermediate file.
It's probably more work, but it IMHO it's eaysier to handle.

If the html-stuff should be directly translated to fo, have a look at
the html to fo conversion guide at
http://www-128.ibm.com/developerworks/library/x-xslfo2app/
it can save you a lot of work.

good luck, Johannes








Gosselin, Michael wrote:
 All,

 I've been talking to folks on the xsl Mulberry list and people here.  I'm
 still struggling getting reports to work.

 When I use the original xsl (PrintFormat.xsl) file with fop (on a Unix
 machine, and how do I determine the version?), I get some errors, but I get
 an output file.  Here's the output:

   AthenaV fop.sh -xml 0603_TEST,HOLD_640.xml -xsl PrintFormat.xsl
 -pdf testOutput.pdf
   [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
   [INFO] FOP 0.20.5
   [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
   [INFO] building formatting object tree
   [INFO] setting up fonts
   [ERROR] Unsupported element encountered: CSection (Namespace:
 urn:Correlagen:RightReport). Source context: unavailable
   [ERROR] Expected XSL-FO (root, page-sequence, etc.), SVG (svg, rect,
 etc.) or elements from another supported language.
   [ERROR] Unsupported element encountered: Content (Namespace:
 urn:Correlagen:RightReport). Source context: unavailable
   [ERROR] Unsupported element encountered: div (Namespace: default).
 Source context: unavailable
   [ERROR] Unsupported element encountered: img (Namespace: default).
 Source context: unavailable
   [ERROR] Unsupported element encountered: br (Namespace: default).
 Source context: unavailable
   [ERROR] Unsupported element encountered: span (Namespace: default).
 Source context: unavailable
   [ERROR] Unsupported element encountered: table (Namespace: default).
 Source context: unavailable
   [ERROR] Unsupported element encountered: tr (Namespace: default).
 Source context: unavailable
   [ERROR] Unsupported element encountered: td (Namespace: default).
 Source context: unavailable
   [ERROR] Unsupported element encountered: i (Namespace: default).
 Source context: unavailable
   [ERROR] Unsupported element encountered: b (Namespace: default).
 Source context: unavailable
   [INFO] [1]
   [ERROR] no handler defined for urn:Correlagen:RightReport:CSection
 foreign xml
   [WARNING] Sum of fixed column widths 396850 greater than maximum
 specified IPD 283464
   [ERROR] Error while creating area : Error while recovering Image
 Informations (file:/home/c/fop/fop-0.20.5/images/WilliamSeltzer.gif
 file:/home/c/fop/fop-0.20.5/images/WilliamSeltzer.gif ) :
 /home/c/fop/fop-0.20.5/images/WilliamSeltzer.gif (No such file or directory)
   [ERROR] Error while creating area : Error while recovering Image
 Informations (file:/home/c/fop/fop-0.20.5/images/DevBatish.gif
 file:/home/c/fop/fop-0.20.5/images/DevBatish.gif ) :
 /home/c/fop/fop-0.20.5/images/DevBatish.gif (No such file or directory)
   [ERROR] Error while creating area : Error while recovering Image
 Informations (file:/home/c/fop/fop-0.20.5/images/NarasimhanNagan.gif
 file:/home/c/fop/fop-0.20.5/images/NarasimhanNagan.gif ) :
 /home/c/fop/fop-0.20.5/images/NarasimhanNagan.gif (No such file or
 directory)
   [INFO] [2]
   [ERROR] no handler defined for urn:Correlagen:RightReport:CSection
 foreign xml
   [INFO] [3]
   [ERROR] At least one of minimum, optimum, or maximum IPD must be
 specified on table.
   [INFO] area contents overflows area in line
   [INFO] area contents overflows area in line
   [INFO] area contents overflows area in line
   [INFO] area contents overflows area in line
   [INFO] area contents overflows area in line
   [INFO] area contents overflows area in line
   [INFO] area contents overflows area in line
   [INFO] area contents overflows area in line
   [INFO] area contents overflows area in line
   [INFO] area contents overflows area in line
   [INFO] area contents overflows area in line
   [INFO] area contents overflows area in line
   [ERROR] no handler defined for urn:Correlagen:RightReport:CSection
 foreign xml
   [INFO] [4]
   [ERROR] At least one of minimum, optimum, or maximum IPD must be
 specified on table.
   [INFO] area contents 

Re: Apache Jar Question

2006-04-07 Thread Jeremias Maerki
That's perfectly feasible. Two things come to my mind that you'll have
to pay attention to:
- If the JARs have different licensing, you have to take care if you
plan to redistribute.
- Duplicate files such as service descriptors in the META-INF/services
directory, for example. You may have to merge these if you encounter any.

On 07.04.2006 13:22:32 Dirk Bromberg wrote:
 is it allowed to extract the files from some apache jar and build one 
 big jar?


Jeremias Maerki


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



Re: Images problem in FOP 0.91 ?

2006-04-07 Thread Jeremias Maerki
Can you post a very small image and a short step-by-step guide to
reproduce? I'll look into it.

On 07.04.2006 16:28:48 Mathieu RECCHIA wrote:
 Hi all, 
 Here's a little question about fop and images. 
 It seems as far as i can see that FOP modify images a little bit. 
 
 For example i use an image with a grey part. On the original image in 
 photoshop i have these CMYK values for the grey : 0-0-0-42 but after a 
 pdf conversion with fop the grey become 0-0-0-47.
 A yellow part is originally : 5-26-73-0 but after the conversion become 
 5-22-65-0
 
 And i've got a lot of example like this one... 
 
 Is it possible that i found a bug on this very good software ?   



Jeremias Maerki


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



Re: Apache Jar Question

2006-04-07 Thread Dirk Bromberg

Thanks for answer,

so i'll watch one it :-)

Dirk

Jeremias Maerki wrote:

That's perfectly feasible. Two things come to my mind that you'll have
to pay attention to:
- If the JARs have different licensing, you have to take care if you
plan to redistribute.
- Duplicate files such as service descriptors in the META-INF/services
directory, for example. You may have to merge these if you encounter any.

On 07.04.2006 13:22:32 Dirk Bromberg wrote:
  
is it allowed to extract the files from some apache jar and build one 
big jar?




Jeremias Maerki


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

  



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