Re: Handling multiple spaces

2004-12-27 Thread Jeremias Maerki
Sorry for the delay. Christmas got in the way.

On 24.12.2004 13:57:47 Saptarshi Sen wrote:
 Hi,
   I am just not able to embed fonts into my PDF images while using
 PDFTranscoder. As a result, the PDF's are quite large.

But the output looks fine, right?

   I created a config file with the font declarations and used the
 Config builder to configure the transcoder. But it does not embed the fonts.
 I could be doing something wrong; but I don't know what. I tried to remove
 the fonts tag in the config file; but even that did not help.
 
   What is interesting is that when I tried to convert my SVG (with
 embedded fonts) into a PDF using the batik-rasterizer.jar utility, it
 actually gave me a PDF with embedded fonts. In this case, I hadn't even
 provided any font information. What is the reason for this?

Frankly, I don't know. It shouldn't, at least not without a font
configuration.

   Also, if this *phenomenon* can be banked on, can I try and use the
 batik-rasterizer utility from within my application?

In the end, the rasterizer utility uses the Transcoder API, so I can't
see right now where this comes from.

I've checked this just now. From the command-line rasterizer I get a
relatively big PDF (32KB) with the text painted as shapes based on the
embedded SVG font subset. The output looks fine. The same I can get from
the Transcoder API. I also checked again with your SVG stripped of the
embedded font but instead using an XML font configuration which
specifies a font to be embedded (I don't have your font, so I just used
a different one). Worked fine, too (11KB with a TrueType font). With the
embedded SVG stripped and without font configuration the PDF is 3KB but
obviously with the wrong font.

I noticed one thing, however. The pdf-transcoder.jar delivered with
Batik 1.5.1 is from early 2003 and does not contain the code that allows
for a font configuration. It also doesn't result in an Exception because
ContainerUtil just skips configuring the Transcoder instance if it
doesn't support that operation. So if you want to use the embedded fonts
it looks like you will need the code from the snapshot you got earlier.
But that may also mean that you have to get the latest Batik from CVS,
because there were a number of API changes since then and you have to
use the latest Batik sources so the two parts work together properly.

   Is there any semi-stable release of FOP since 0.20.5 where the
 xml:space attribute is respected and which is ready for use in
 applications. It need not have all features that are there in the current
 version - I just want that attribute to be respected. If such a release does
 not exist, is there any code snippet that recognizes the xml:space
 attribute which I can plug into the 0.20.5 code and rebuild the fop.jar file?

The maintenance branch (where 0.20.5 came from) doesn't seem to contain
a fix for that. I actually tested on that code, not on 0.20.5. So, no,
there is currently no easy fix for this problem. I don't even know,
off-hand, where to start looking. This would take a nice debugging
session which I'm not very keen on because I have other priorities. And
IMO, it's not the right approach to use an XSL-FO wrapper for this.


Jeremias Maerki


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



FW: Handling multiple spaces

2004-12-24 Thread Saptarshi Sen
Hi,
I got the problem regarding the NoClassDefFoundErrors. The new jars
weren't mentioned in my Manifest file. I was able to generate PDF's from my
application using the PDF transcoder. However, they do not have the fonts
embedded and hence are quite large.

I had a few questions regarding font embedding. 
1. Can I use the same font metrics files(xml) with Batik that I used
for FOP?
2. The SVG that I generate (using Corda PopChart) has fonts embedded
within it. Say, I was using TradeGothic CondEighteen, it appears in my SVG
as:

!ENTITY s2 font-family:'CF TradeGothic
CondEighteen';font-size:7;fill:#00;pointer-events:none;  (Note the 'CF
' prepended to the font name).

The font definition is like:
defs
font horiz-adv-x=1168
font-face font-family=CF TradeGothic
CondEighteen units-per-em=1024 panose-1=0 0 4 0 0 0 0 0 0 0 ascent=950
descent=-216/
..
/font
/defs
(Again, the font is named as 'CF TradeGothic CondEighteen').

Am I correct in saying that the 'CF ' part is supposed to be internal
to the SVG file and not to be used outside it? The font in the metrics file
is called 'TradeGothic CondEighteen' (which is what it should be).

Now, if I were to use the PDFTranscoder to convert the SVG to PDF, do
I need to replace all the 'CF TradeGothic CondEighteen' with 'TradeGothic
CondEighteen'? Also, while converting from SVG to PDF, are the font
definitions defsfont ./font/defs taken into consideration? I
mean, does PDFTranscoder use the font definition? (When I was using FOP to do
this conversion, I used to form the FO file from the SVG file. In that, I
used to keep only the SVG part and strip the definitions. I also used to
replace the 'CF TradeGothic CondEighteen' with 'TradeGothic CondEighteen'. Do
I need to the same/similar thing here?)

I am attaching a typical SVG file that is generated by PopChart.

Regards,
Saptarshi.

 pieUnicodeSVG.svg 



  -Original Message-
 From: Saptarshi Sen  
 Sent: Thursday, December 23, 2004 10:00 PM
 To:   '[EMAIL PROTECTED]'
 Subject:  RE: Handling multiple spaces
 
 This is getting increasingly away from FOP and closer to
 Batik.nevertheless, I am continuing along this thread to get some more
 inputs.
 
 I have added all the jar's under batik's lib folder into my project as well
 as my Weblogic domain (where other libraries are placed).
 
 However, when I try to run the application I get a
 java.lang.NoClassDefFoundError:
 org/apache/batik/transcoder/TranscoderException. Is there anything that I
 am missing. (I found a similar query by another person who was using
 Tomcat. The reply simply asked him to include the jars under the web
 container's lib directory).
 
 
 In my case, I have all the jar's already in my Weblogic's application
 folder.
 
 Thanks,
 Saptarshi.
 
 -Original Message-
 From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
 Sent: Thursday, December 23, 2004 7:37 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Handling multiple spaces
 
 
 Uh, now it gets complicated
 
 On 23.12.2004 14:32:56 Saptarshi Sen wrote:
  Hi,
  I got the desired output using Batik. I am now trying to integrate it
  into my application.
  
  Since Batik uses the PDFTranscoder class from FOP, what are the
  various jar's that I need to include in my project path. I understand
 that I
  should remove the fop.jar (from version 0.20.5) from my project path.
 Which
  are the jar's from batik 1.5.1 that I need to include.
 
 I think you need all JARs from the lib directory of the binary
 distribution except batik-svggen.jar and batik-swing.jar. Not sure. I'd
 have to do a trial-and-error. pdf-transcoder.jar contains all classes
 needed by FOP's PDF Transcoder.
 
  A few requirements in my application is that I'll be embedding custom
  fonts and using batik just for SVG to PDF conversion.
 
 Now for the tricky part. Font configuration for the new transcoder is
 not documented, yet, and it's a bit different than in FOP 0.20.5 and may
 even change again until the first release of the redesign code.
 
 Here's a snippet to create an Avalon Configuration Object with the font
 configuration:
 
 import org.apache.avalon.framework.configuration.Configuration;
 import
 org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
 import org.apache.avalon.framework.container.ContainerUtil;
 
 import org.apache.batik.transcoder.Transcoder;
 import org.apache.batik.transcoder.TranscoderException;
 import org.apache.batik.transcoder.TranscoderInput;
 import org.apache.batik.transcoder.TranscoderOutput;
 import org.apache.batik.transcoder.XMLAbstractTranscoder;
 import org.apache.batik.transcoder.image.ImageTranscoder;
 
 [..]
 
 //Transcoder instantiation
 Transcoder transcoder = transcoder = new

Re: Handling multiple spaces

2004-12-24 Thread Jeremias Maerki

On 23.12.2004 17:29:45 Saptarshi Sen wrote:
 This is getting increasingly away from FOP and closer to
 Batik.

I hope that's not a problem for you. FOP is a XSL-FO converter while
Batik is an SVG converter. FOP just happens to implement the part that
converts SVG to PDF. This aspect is suboptimal and is going to be
addressed. The PDF Transcoder will move to a different location closer
to the Batik subproject in the near future.

 nevertheless, I am continuing along this thread to get some more
 inputs.
 
 I have added all the jar's under batik's lib folder into my project as well
 as my Weblogic domain (where other libraries are placed).
 
 However, when I try to run the application I get a
 java.lang.NoClassDefFoundError:
 org/apache/batik/transcoder/TranscoderException. Is there anything that I am
 missing. (I found a similar query by another person who was using Tomcat. The
 reply simply asked him to include the jars under the web container's lib
 directory).
 
 
 In my case, I have all the jar's already in my Weblogic's application folder.

The TranscoderException is in batik-transcoder.jar. Looks like you've
fallen victim to classloading problems with Weblogic. As I don't have
Weblogic it's certainly a bit difficult to provide assistance here. I'd
simply make sure that the necessary JARs for SVG processing are all at
the same location so they make it into the same ClassLoader. Make sure
not to create strange setups with XML Parsers (Xerces et al.) as they
are covered by the JDK/JRE assuming you work with =1.4.

Jeremias Maerki


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



Re: Handling multiple spaces

2004-12-24 Thread Jeremias Maerki

On 24.12.2004 06:36:14 Saptarshi Sen wrote:
 Hi,
   I got the problem regarding the NoClassDefFoundErrors. The new jars
 weren't mentioned in my Manifest file.

Now that I look at this a second time I realize that you mean that
you've solved the problem. D'Oh.

 I was able to generate PDF's from my
 application using the PDF transcoder. However, they do not have the fonts
 embedded and hence are quite large.
 
   I had a few questions regarding font embedding. 
   1. Can I use the same font metrics files(xml) with Batik that I used
 for FOP?

Yes, I think so. If there are any problems just recreate the font
metrics using the PFMReader and TTFReader from FOP's CVS HEAD. But there
shouldn't really be any differences.

   2. The SVG that I generate (using Corda PopChart) has fonts embedded
 within it. Say, I was using TradeGothic CondEighteen, it appears in my SVG
 as:
 
   !ENTITY s2 font-family:'CF TradeGothic
 CondEighteen';font-size:7;fill:#00;pointer-events:none;  (Note the 'CF
 ' prepended to the font name).
 
   The font definition is like:
   defs
   font horiz-adv-x=1168
   font-face font-family=CF TradeGothic
 CondEighteen units-per-em=1024 panose-1=0 0 4 0 0 0 0 0 0 0 ascent=950
 descent=-216/
   ..
   /font
   /defs
   (Again, the font is named as 'CF TradeGothic CondEighteen').
 
   Am I correct in saying that the 'CF ' part is supposed to be internal
 to the SVG file and not to be used outside it? The font in the metrics file
 is called 'TradeGothic CondEighteen' (which is what it should be).

I've seen that there are sometimes multiple names for a single font
which can lead to a certain amount of confusion.

   Now, if I were to use the PDFTranscoder to convert the SVG to PDF, do
 I need to replace all the 'CF TradeGothic CondEighteen' with 'TradeGothic
 CondEighteen'? 

I've seen behaviour like this before but until today haven't
investigated, yet. Simply use the same names in your font configuration
XML so the font gets detected. You can define aliases (i.e.
font-triplets) there.

 Also, while converting from SVG to PDF, are the font
 definitions defsfont ./font/defs taken into consideration? I
 mean, does PDFTranscoder use the font definition? (When I was using FOP to do
 this conversion, I used to form the FO file from the SVG file. In that, I
 used to keep only the SVG part and strip the definitions. I also used to
 replace the 'CF TradeGothic CondEighteen' with 'TradeGothic CondEighteen'. Do
 I need to the same/similar thing here?)

FOP's :-) PDFTranscoder cannot use these embedded SVG fonts. They are
handled by Batik. There's a todo item where these embedded fonts should
be converted to Type3 fonts but that's not implemented, yet. I suggest
you do the same stripping you've done for FOP.

   I am attaching a typical SVG file that is generated by PopChart.


Jeremias Maerki


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



RE: Handling multiple spaces

2004-12-24 Thread Saptarshi Sen
Hi,
I am just not able to embed fonts into my PDF images while using
PDFTranscoder. As a result, the PDF's are quite large.

I created a config file with the font declarations and used the
Config builder to configure the transcoder. But it does not embed the fonts.
I could be doing something wrong; but I don't know what. I tried to remove
the fonts tag in the config file; but even that did not help.

What is interesting is that when I tried to convert my SVG (with
embedded fonts) into a PDF using the batik-rasterizer.jar utility, it
actually gave me a PDF with embedded fonts. In this case, I hadn't even
provided any font information. What is the reason for this?

Also, if this *phenomenon* can be banked on, can I try and use the
batik-rasterizer utility from within my application?

Is there any semi-stable release of FOP since 0.20.5 where the
xml:space attribute is respected and which is ready for use in
applications. It need not have all features that are there in the current
version - I just want that attribute to be respected. If such a release does
not exist, is there any code snippet that recognizes the xml:space
attribute which I can plug into the 0.20.5 code and rebuild the fop.jar file?

Wish you a Merry Christmas.

Thanks,
Saptarshi.

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: Friday, December 24, 2004 12:54 PM
To: [EMAIL PROTECTED]
Subject: Re: Handling multiple spaces



On 24.12.2004 06:36:14 Saptarshi Sen wrote:
 Hi,
   I got the problem regarding the NoClassDefFoundErrors. The new jars
 weren't mentioned in my Manifest file.

Now that I look at this a second time I realize that you mean that
you've solved the problem. D'Oh.

 I was able to generate PDF's from my
 application using the PDF transcoder. However, they do not have the fonts
 embedded and hence are quite large.
 
   I had a few questions regarding font embedding. 
   1. Can I use the same font metrics files(xml) with Batik that I used
 for FOP?

Yes, I think so. If there are any problems just recreate the font
metrics using the PFMReader and TTFReader from FOP's CVS HEAD. But there
shouldn't really be any differences.

   2. The SVG that I generate (using Corda PopChart) has fonts embedded
 within it. Say, I was using TradeGothic CondEighteen, it appears in my SVG
 as:
 
   !ENTITY s2 font-family:'CF TradeGothic
 CondEighteen';font-size:7;fill:#00;pointer-events:none;  (Note the
'CF
 ' prepended to the font name).
 
   The font definition is like:
   defs
   font horiz-adv-x=1168
   font-face font-family=CF TradeGothic
 CondEighteen units-per-em=1024 panose-1=0 0 4 0 0 0 0 0 0 0
ascent=950
 descent=-216/
   ..
   /font
   /defs
   (Again, the font is named as 'CF TradeGothic CondEighteen').
 
   Am I correct in saying that the 'CF ' part is supposed to be internal
 to the SVG file and not to be used outside it? The font in the metrics file
 is called 'TradeGothic CondEighteen' (which is what it should be).

I've seen that there are sometimes multiple names for a single font
which can lead to a certain amount of confusion.

   Now, if I were to use the PDFTranscoder to convert the SVG to PDF, do
 I need to replace all the 'CF TradeGothic CondEighteen' with 'TradeGothic
 CondEighteen'? 

I've seen behaviour like this before but until today haven't
investigated, yet. Simply use the same names in your font configuration
XML so the font gets detected. You can define aliases (i.e.
font-triplets) there.

 Also, while converting from SVG to PDF, are the font
 definitions defsfont ./font/defs taken into consideration?
I
 mean, does PDFTranscoder use the font definition? (When I was using FOP to
do
 this conversion, I used to form the FO file from the SVG file. In that, I
 used to keep only the SVG part and strip the definitions. I also used to
 replace the 'CF TradeGothic CondEighteen' with 'TradeGothic CondEighteen'.
Do
 I need to the same/similar thing here?)

FOP's :-) PDFTranscoder cannot use these embedded SVG fonts. They are
handled by Batik. There's a todo item where these embedded fonts should
be converted to Type3 fonts but that's not implemented, yet. I suggest
you do the same stripping you've done for FOP.

   I am attaching a typical SVG file that is generated by PopChart.


Jeremias Maerki


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

-
Disclaimer
-

This message(including attachment

Re: Handling multiple spaces

2004-12-23 Thread Jeremias Maerki
Please, always follow up on the fop-users mailing list so other people
can profit, too.

The right URL is actually this one:
http://cvs.apache.org/viewcvs.cgi/xml-fop/src/java/org/apache/fop/svg/PDFTranscoder.java

You need to download the HEAD tag (i.e. without any additional
parameters) from CVS as documented here:
http://xml.apache.org/fop/dev/index.html
http://xml.apache.org/cvs.html

Alternatively, CVS snapshots are here:
http://cvs.apache.org/snapshots/xml-fop/

Note to fop-devs: We don't seem to have a link to
http://xml.apache.org/fop/download.html in the menu structure anymore.

On 23.12.2004 10:38:10 Saptarshi Sen wrote:
 Hi,
   I was trying to get the PDFTranscoder from the head version (as you
 had mentioned). Was checking the logs at the following location:
 http://cvs.apache.org/viewcvs.cgi/xml-fop/src/org/apache/fop/svg/PDFTranscode
 r.java?hideattic=0rev=1.25view=log. Can you tell me which one will have the
 required fix; for respecting the xml:preserve attribute.
 
 Thanks,
 Saptarshi.
 
 -Original Message-
 From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 22, 2004 7:07 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Handling multiple spaces
 
 
 Seems to be a bug in the SVG part in FOP 0.20.5. The attribute is
 respected in the new SVG transcoder (in FOP CVS HEAD), however. If you
 only need to convert the SVG into PDF (without any real need for XSL-FO),
 you can try the PDF Transcoder for Batik. Try the one shipped with the
 latest Batik release or if this still doesn't help, download the FOP
 source code from CVS (or using a CVS snapshot) to build the PDF
 Transcoder yourself.
 
 On 22.12.2004 10:47:51 Saptarshi Sen wrote:
  The xml:space=preserve attribute does not seem to have any effect on the
  PDF generated. The SVG image is within a fo:instream-foreign-object tag. I
  could not find any attribute that will preserve white spaces.
  
  I am attaching a typical fo file that we generate.
  
  Thanks,
  Saptarshi.
  
   pieUnicodeSVG.fo 
  
-Original Message-
   From: Saptarshi Sen  
   Sent: Wednesday, December 22, 2004 12:54 PM
   To:   FOP Mailing List (E-mail)
   Subject:  Handling multiple spaces
   
   Hi,
 We are using FOP to convert SVG images into PDF. The SVG images are
   generated using a tool called PopChart.
   
 When we view the SVG image, multiple spaces are collapsed into a
   single space. This can be offset using the xml:space=preserve attribute
   in the text tags. Is there any other method by which we can preserve
   multiple spaces.
   
 Since I do not have any control over the SVG image produced by
   PopChart, can I set any parameters during the FOP call? Alternatively, I
   could include the  xml:space=preserve attribute in my text tags, but
 this
   would be very messy. Is there an easier approach?
   
   Thanks,
   Saptarshi.



Jeremias Maerki


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



RE: Handling multiple spaces

2004-12-23 Thread Saptarshi Sen
Hi,
I tried to download the latest Code from
http://cvs.apache.org/snapshots/xml-fop/xml-fop_20041223052817.tar.gz and
then did a build on it. While converting the fo file into a PDF, I get the
error:

Exception in thread main java.lang.OutOfMemoryError
no stack trace available

Attaching the fo file. What could be the possible reason?

Thanks,
Saptarshi.

P.S. I performed the build using the build.bat file from FOP 0.20.5; The
build was successful. Could this have anything to do with this error?


-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 23, 2004 3:36 PM
To: [EMAIL PROTECTED]
Subject: Re: Handling multiple spaces


Please, always follow up on the fop-users mailing list so other people
can profit, too.

The right URL is actually this one:
http://cvs.apache.org/viewcvs.cgi/xml-fop/src/java/org/apache/fop/svg/PDFTran
scoder.java

You need to download the HEAD tag (i.e. without any additional
parameters) from CVS as documented here:
http://xml.apache.org/fop/dev/index.html
http://xml.apache.org/cvs.html

Alternatively, CVS snapshots are here:
http://cvs.apache.org/snapshots/xml-fop/

Note to fop-devs: We don't seem to have a link to
http://xml.apache.org/fop/download.html in the menu structure anymore.

On 23.12.2004 10:38:10 Saptarshi Sen wrote:
 Hi,
   I was trying to get the PDFTranscoder from the head version (as you
 had mentioned). Was checking the logs at the following location:

http://cvs.apache.org/viewcvs.cgi/xml-fop/src/org/apache/fop/svg/PDFTranscode
 r.java?hideattic=0rev=1.25view=log. Can you tell me which one will have
the
 required fix; for respecting the xml:preserve attribute.
 
 Thanks,
 Saptarshi.
 
 -Original Message-
 From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 22, 2004 7:07 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Handling multiple spaces
 
 
 Seems to be a bug in the SVG part in FOP 0.20.5. The attribute is
 respected in the new SVG transcoder (in FOP CVS HEAD), however. If you
 only need to convert the SVG into PDF (without any real need for XSL-FO),
 you can try the PDF Transcoder for Batik. Try the one shipped with the
 latest Batik release or if this still doesn't help, download the FOP
 source code from CVS (or using a CVS snapshot) to build the PDF
 Transcoder yourself.
 
 On 22.12.2004 10:47:51 Saptarshi Sen wrote:
  The xml:space=preserve attribute does not seem to have any effect on
the
  PDF generated. The SVG image is within a fo:instream-foreign-object tag.
I
  could not find any attribute that will preserve white spaces.
  
  I am attaching a typical fo file that we generate.
  
  Thanks,
  Saptarshi.
  
   pieUnicodeSVG.fo 
  
-Original Message-
   From: Saptarshi Sen  
   Sent: Wednesday, December 22, 2004 12:54 PM
   To:   FOP Mailing List (E-mail)
   Subject:  Handling multiple spaces
   
   Hi,
 We are using FOP to convert SVG images into PDF. The SVG images are
   generated using a tool called PopChart.
   
 When we view the SVG image, multiple spaces are collapsed into a
   single space. This can be offset using the xml:space=preserve
attribute
   in the text tags. Is there any other method by which we can preserve
   multiple spaces.
   
 Since I do not have any control over the SVG image produced by
   PopChart, can I set any parameters during the FOP call? Alternatively,
I
   could include the  xml:space=preserve attribute in my text tags, but
 this
   would be very messy. Is there an easier approach?
   
   Thanks,
   Saptarshi.



Jeremias Maerki


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



pieUnicodeSVG.fo
Description: pieUnicodeSVG.fo
-
Disclaimer
-

This message(including attachment if any)is confidential and may be 
privileged.Before opening attachments please check them
for viruses and defects.MindTree Consulting Private Limited (MindTree)will not 
be responsible for any viruses or defects or
any forwarded attachments emanating either from within MindTree or outside.If 
you have received this message by mistake please notify the sender by return  
e-mail and delete this message from your system. Any unauthorized use or 
dissemination of this message in whole or in part is strictly prohibited.  
Please note that e-mails are susceptible to change and MindTree shall not be 
liable for any improper, untimely or incomplete transmission.

-
-
To unsubscribe

Re: Handling multiple spaces

2004-12-23 Thread Jeremias Maerki
Same here. That's why I said earlier, that you should use the PDF
Transcoder (not FOP itself) if you can live without XSL-FO, because if
you need XSL-FO (which I don't know) then you've got bad luck because
there's currently no work-around. The CVS HEAD code is our code
currently being redesigned and it will probably not work for any
real-life application at the moment.

I've just verified the following with success:
- Download Batik 1.5.1 (http://xml.apache.org/batik/)
- Extract the SVG from the FO file into a plain SVG file.
- On the command-line say: 
java -jar batik-rasterizer.jar -m application/pdf pieUnicode.svg

(This uses FOP's PDF Transcoder to convert SVG to PDF. No XSL-FO
involved.)

Produces a nice PDF with spaces respected. If you need to integrate that
in a Java application, then look at the Transcoder documentation here:
http://xml.apache.org/batik/rasterizerTutorial.html
http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ExampleSVG2PDF.java?rev=HEAD

On 23.12.2004 12:07:50 Saptarshi Sen wrote:
 Hi,
   I tried to download the latest Code from
 http://cvs.apache.org/snapshots/xml-fop/xml-fop_20041223052817.tar.gz and
 then did a build on it. While converting the fo file into a PDF, I get the
 error:
 
 Exception in thread main java.lang.OutOfMemoryError
 no stack trace available
 
 Attaching the fo file. What could be the possible reason?
 
 Thanks,
 Saptarshi.
 
 P.S. I performed the build using the build.bat file from FOP 0.20.5; The
 build was successful. Could this have anything to do with this error?


Jeremias Maerki


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



RE: Handling multiple spaces

2004-12-23 Thread Saptarshi Sen
Hi,
I got the desired output using Batik. I am now trying to integrate it
into my application.

Since Batik uses the PDFTranscoder class from FOP, what are the
various jar's that I need to include in my project path. I understand that I
should remove the fop.jar (from version 0.20.5) from my project path. Which
are the jar's from batik 1.5.1 that I need to include.

A few requirements in my application is that I'll be embedding custom
fonts and using batik just for SVG to PDF conversion.

Thanks.
Saptarshi.

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 23, 2004 5:13 PM
To: [EMAIL PROTECTED]
Subject: Re: Handling multiple spaces


Same here. That's why I said earlier, that you should use the PDF
Transcoder (not FOP itself) if you can live without XSL-FO, because if
you need XSL-FO (which I don't know) then you've got bad luck because
there's currently no work-around. The CVS HEAD code is our code
currently being redesigned and it will probably not work for any
real-life application at the moment.

I've just verified the following with success:
- Download Batik 1.5.1 (http://xml.apache.org/batik/)
- Extract the SVG from the FO file into a plain SVG file.
- On the command-line say: 
java -jar batik-rasterizer.jar -m application/pdf pieUnicode.svg

(This uses FOP's PDF Transcoder to convert SVG to PDF. No XSL-FO
involved.)

Produces a nice PDF with spaces respected. If you need to integrate that
in a Java application, then look at the Transcoder documentation here:
http://xml.apache.org/batik/rasterizerTutorial.html
http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/E
xampleSVG2PDF.java?rev=HEAD

On 23.12.2004 12:07:50 Saptarshi Sen wrote:
 Hi,
   I tried to download the latest Code from
 http://cvs.apache.org/snapshots/xml-fop/xml-fop_20041223052817.tar.gz and
 then did a build on it. While converting the fo file into a PDF, I get the
 error:
 
 Exception in thread main java.lang.OutOfMemoryError
 no stack trace available
 
 Attaching the fo file. What could be the possible reason?
 
 Thanks,
 Saptarshi.
 
 P.S. I performed the build using the build.bat file from FOP 0.20.5; The
 build was successful. Could this have anything to do with this error?


Jeremias Maerki


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

-
Disclaimer
-

This message(including attachment if any)is confidential and may be 
privileged.Before opening attachments please check them
for viruses and defects.MindTree Consulting Private Limited (MindTree)will not 
be responsible for any viruses or defects or
any forwarded attachments emanating either from within MindTree or outside.If 
you have received this message by mistake please notify the sender by return  
e-mail and delete this message from your system. Any unauthorized use or 
dissemination of this message in whole or in part is strictly prohibited.  
Please note that e-mails are susceptible to change and MindTree shall not be 
liable for any improper, untimely or incomplete transmission.

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

Re: Handling multiple spaces

2004-12-23 Thread Jeremias Maerki
Uh, now it gets complicated

On 23.12.2004 14:32:56 Saptarshi Sen wrote:
 Hi,
   I got the desired output using Batik. I am now trying to integrate it
 into my application.
 
   Since Batik uses the PDFTranscoder class from FOP, what are the
 various jar's that I need to include in my project path. I understand that I
 should remove the fop.jar (from version 0.20.5) from my project path. Which
 are the jar's from batik 1.5.1 that I need to include.

I think you need all JARs from the lib directory of the binary
distribution except batik-svggen.jar and batik-swing.jar. Not sure. I'd
have to do a trial-and-error. pdf-transcoder.jar contains all classes
needed by FOP's PDF Transcoder.

   A few requirements in my application is that I'll be embedding custom
 fonts and using batik just for SVG to PDF conversion.

Now for the tricky part. Font configuration for the new transcoder is
not documented, yet, and it's a bit different than in FOP 0.20.5 and may
even change again until the first release of the redesign code.

Here's a snippet to create an Avalon Configuration Object with the font
configuration:

import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
import org.apache.avalon.framework.container.ContainerUtil;

import org.apache.batik.transcoder.Transcoder;
import org.apache.batik.transcoder.TranscoderException;
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.XMLAbstractTranscoder;
import org.apache.batik.transcoder.image.ImageTranscoder;

[..]

//Transcoder instantiation
Transcoder transcoder = transcoder = new org.apache.fop.svg.PDFTranscoder();

[..]

//Font configuration
DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.buildFromFile(new 
File(src/xml/pdf-transcoder-cfg.xml));
ContainerUtil.configure(transcoder, cfg);

[..]

//Transcoder properties supported by the PDF Transcoder
int dpi = 300;
transcoder.addTranscodingHint(ImageTranscoder.KEY_PIXEL_UNIT_TO_MILLIMETER, 
new Float((float)(25.4 / dpi))); 
transcoder.addTranscodingHint(XMLAbstractTranscoder.KEY_XML_PARSER_VALIDATING, 
Boolean.FALSE);
transcoder.addTranscodingHint(PDFTranscoder.KEY_STROKE_TEXT, Boolean.FALSE);

[..]

//On with the normal transcoding process as documented in Batik...



The XML file for the font configuration would look approximately like
this:

  cfg
fonts
  font metrics-url=file:C:/Dev/FOP/temp/fonts/FUTURAL.ttf.xml 
kerning=no embed-url=file:C:/Dev/FOP/Temp/fonts/FUTURAL.ttf
font-triplet name=Futura style=normal weight=200/
font-triplet name=Futura style=normal weight=normal/
  /font
  font metrics-url=file:C:\Dev\FOP\temp\fonts\ARIAL.TTF.xml 
kerning=no embed-url=file:C:/Dev/FOP/Temp/fonts/ARIAL.ttf
font-triplet name=Arial style=normal weight=normal/
  /font
  font metrics-url=file:C:\Dev\FOP\temp\fonts\ARIALBD.TTF.xml 
kerning=no embed-url=file:C:/Dev/FOP/Temp/fonts/ARIALBD.ttf
font-triplet name=Arial style=normal weight=bold/
  /font
/fonts
  /cfg


There's one potential problem, though: I don't know what version of the
PDF Transcoder is in the Batik 1.5.1 release. That part didn't get
released properly. It could be that the font configuration doesn't work,
but I hope so.


Jeremias Maerki


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



RE: Handling multiple spaces

2004-12-23 Thread Saptarshi Sen
This is getting increasingly away from FOP and closer to
Batik.nevertheless, I am continuing along this thread to get some more
inputs.

I have added all the jar's under batik's lib folder into my project as well
as my Weblogic domain (where other libraries are placed).

However, when I try to run the application I get a
java.lang.NoClassDefFoundError:
org/apache/batik/transcoder/TranscoderException. Is there anything that I am
missing. (I found a similar query by another person who was using Tomcat. The
reply simply asked him to include the jars under the web container's lib
directory).


In my case, I have all the jar's already in my Weblogic's application folder.

Thanks,
Saptarshi.

-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 23, 2004 7:37 PM
To: [EMAIL PROTECTED]
Subject: Re: Handling multiple spaces


Uh, now it gets complicated

On 23.12.2004 14:32:56 Saptarshi Sen wrote:
 Hi,
   I got the desired output using Batik. I am now trying to integrate it
 into my application.
 
   Since Batik uses the PDFTranscoder class from FOP, what are the
 various jar's that I need to include in my project path. I understand that
I
 should remove the fop.jar (from version 0.20.5) from my project path. Which
 are the jar's from batik 1.5.1 that I need to include.

I think you need all JARs from the lib directory of the binary
distribution except batik-svggen.jar and batik-swing.jar. Not sure. I'd
have to do a trial-and-error. pdf-transcoder.jar contains all classes
needed by FOP's PDF Transcoder.

   A few requirements in my application is that I'll be embedding custom
 fonts and using batik just for SVG to PDF conversion.

Now for the tricky part. Font configuration for the new transcoder is
not documented, yet, and it's a bit different than in FOP 0.20.5 and may
even change again until the first release of the redesign code.

Here's a snippet to create an Avalon Configuration Object with the font
configuration:

import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
import org.apache.avalon.framework.container.ContainerUtil;

import org.apache.batik.transcoder.Transcoder;
import org.apache.batik.transcoder.TranscoderException;
import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.XMLAbstractTranscoder;
import org.apache.batik.transcoder.image.ImageTranscoder;

[..]

//Transcoder instantiation
Transcoder transcoder = transcoder = new org.apache.fop.svg.PDFTranscoder();

[..]

//Font configuration
DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.buildFromFile(new
File(src/xml/pdf-transcoder-cfg.xml));
ContainerUtil.configure(transcoder, cfg);

[..]

//Transcoder properties supported by the PDF Transcoder
int dpi = 300;
transcoder.addTranscodingHint(ImageTranscoder.KEY_PIXEL_UNIT_TO_MILLIMETER, 
new Float((float)(25.4 / dpi))); 
transcoder.addTranscodingHint(XMLAbstractTranscoder.KEY_XML_PARSER_VALIDATING
, Boolean.FALSE);
transcoder.addTranscodingHint(PDFTranscoder.KEY_STROKE_TEXT, Boolean.FALSE);

[..]

//On with the normal transcoding process as documented in Batik...



The XML file for the font configuration would look approximately like
this:

  cfg
fonts
  font metrics-url=file:C:/Dev/FOP/temp/fonts/FUTURAL.ttf.xml
kerning=no embed-url=file:C:/Dev/FOP/Temp/fonts/FUTURAL.ttf
font-triplet name=Futura style=normal weight=200/
font-triplet name=Futura style=normal weight=normal/
  /font
  font metrics-url=file:C:\Dev\FOP\temp\fonts\ARIAL.TTF.xml
kerning=no embed-url=file:C:/Dev/FOP/Temp/fonts/ARIAL.ttf
font-triplet name=Arial style=normal weight=normal/
  /font
  font metrics-url=file:C:\Dev\FOP\temp\fonts\ARIALBD.TTF.xml
kerning=no embed-url=file:C:/Dev/FOP/Temp/fonts/ARIALBD.ttf
font-triplet name=Arial style=normal weight=bold/
  /font
/fonts
  /cfg


There's one potential problem, though: I don't know what version of the
PDF Transcoder is in the Batik 1.5.1 release. That part didn't get
released properly. It could be that the font configuration doesn't work,
but I hope so.


Jeremias Maerki


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

-
Disclaimer
-

This message(including attachment if any)is confidential and may be 
privileged.Before opening attachments please check them
for viruses and defects.MindTree Consulting Private

Handling multiple spaces

2004-12-22 Thread Saptarshi Sen
Hi,
We are using FOP to convert SVG images into PDF. The SVG images are
generated using a tool called PopChart.

When we view the SVG image, multiple spaces are collapsed into a
single space. This can be offset using the xml:space=preserve attribute in
the text tags. Is there any other method by which we can preserve multiple
spaces.

Since I do not have any control over the SVG image produced by
PopChart, can I set any parameters during the FOP call? Alternatively, I
could include the  xml:space=preserve attribute in my text tags, but this
would be very messy. Is there an easier approach?

Thanks,
Saptarshi.
-
Disclaimer
-

This message(including attachment if any)is confidential and may be 
privileged.Before opening attachments please check them
for viruses and defects.MindTree Consulting Private Limited (MindTree)will not 
be responsible for any viruses or defects or
any forwarded attachments emanating either from within MindTree or outside.If 
you have received this message by mistake please notify the sender by return  
e-mail and delete this message from your system. Any unauthorized use or 
dissemination of this message in whole or in part is strictly prohibited.  
Please note that e-mails are susceptible to change and MindTree shall not be 
liable for any improper, untimely or incomplete transmission.

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

RE: Handling multiple spaces

2004-12-22 Thread Saptarshi Sen
The xml:space=preserve attribute does not seem to have any effect on the
PDF generated. The SVG image is within a fo:instream-foreign-object tag. I
could not find any attribute that will preserve white spaces.

I am attaching a typical fo file that we generate.

Thanks,
Saptarshi.

 pieUnicodeSVG.fo 

  -Original Message-
 From: Saptarshi Sen  
 Sent: Wednesday, December 22, 2004 12:54 PM
 To:   FOP Mailing List (E-mail)
 Subject:  Handling multiple spaces
 
 Hi,
   We are using FOP to convert SVG images into PDF. The SVG images are
 generated using a tool called PopChart.
 
   When we view the SVG image, multiple spaces are collapsed into a
 single space. This can be offset using the xml:space=preserve attribute
 in the text tags. Is there any other method by which we can preserve
 multiple spaces.
 
   Since I do not have any control over the SVG image produced by
 PopChart, can I set any parameters during the FOP call? Alternatively, I
 could include the  xml:space=preserve attribute in my text tags, but this
 would be very messy. Is there an easier approach?
 
 Thanks,
 Saptarshi.


pieUnicodeSVG.fo
Description: pieUnicodeSVG.fo
-
Disclaimer
-

This message(including attachment if any)is confidential and may be 
privileged.Before opening attachments please check them
for viruses and defects.MindTree Consulting Private Limited (MindTree)will not 
be responsible for any viruses or defects or
any forwarded attachments emanating either from within MindTree or outside.If 
you have received this message by mistake please notify the sender by return  
e-mail and delete this message from your system. Any unauthorized use or 
dissemination of this message in whole or in part is strictly prohibited.  
Please note that e-mails are susceptible to change and MindTree shall not be 
liable for any improper, untimely or incomplete transmission.

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

Re: Handling multiple spaces

2004-12-22 Thread Jeremias Maerki
Seems to be a bug in the SVG part in FOP 0.20.5. The attribute is
respected in the new SVG transcoder (in FOP CVS HEAD), however. If you
only need to convert the SVG into PDF (without any real need for XSL-FO),
you can try the PDF Transcoder for Batik. Try the one shipped with the
latest Batik release or if this still doesn't help, download the FOP
source code from CVS (or using a CVS snapshot) to build the PDF
Transcoder yourself.

On 22.12.2004 10:47:51 Saptarshi Sen wrote:
 The xml:space=preserve attribute does not seem to have any effect on the
 PDF generated. The SVG image is within a fo:instream-foreign-object tag. I
 could not find any attribute that will preserve white spaces.
 
 I am attaching a typical fo file that we generate.
 
 Thanks,
 Saptarshi.
 
  pieUnicodeSVG.fo 
 
   -Original Message-
  From:   Saptarshi Sen  
  Sent:   Wednesday, December 22, 2004 12:54 PM
  To: FOP Mailing List (E-mail)
  Subject:Handling multiple spaces
  
  Hi,
  We are using FOP to convert SVG images into PDF. The SVG images are
  generated using a tool called PopChart.
  
  When we view the SVG image, multiple spaces are collapsed into a
  single space. This can be offset using the xml:space=preserve attribute
  in the text tags. Is there any other method by which we can preserve
  multiple spaces.
  
  Since I do not have any control over the SVG image produced by
  PopChart, can I set any parameters during the FOP call? Alternatively, I
  could include the  xml:space=preserve attribute in my text tags, but this
  would be very messy. Is there an easier approach?
  
  Thanks,
  Saptarshi.



Jeremias Maerki


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



Spaces when rendering PCL format

2004-04-07 Thread Razvan Veina
Hi everyone,

I'm having a strange problem when rendering PCL with FOP, and I wander if
anybody have an idea about this:
I have some kind of a table with some texts in it. The texts may contain one
ore more spaces inside. My problem is that some of the texts containing
spaces are displayed badly. And by badly I mean that the text after the
space is displayed over the ending of
the text before space. It's a little bit difficult to explain in words. It's
like instead of Line no I see Lineno, with no starting at the middle
of the e character. I noticed that the problem seems to appear so far only
on the first column of my table...

The code that displays a cell with problems is trivial :

fo:table-cell border-top-style=double border-top-width=1pt
border-top-color=black
fo:blockLine no/fo:block
/fo:table-cell

Any ideas ?
Thanx.


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



Re: Spaces when rendering PCL format

2004-04-07 Thread Chris Bowditch
Razvan Veina wrote:
  fo:table-cell border-top-style=double border-top-width=1pt
border-top-color=black
fo:blockLine no/fo:block
/fo:table-cell
Can you make sure the width defined for the column is not smaller than the 
width of Line no Failing that its probably just a deficiency of the PCL 
Renderer. It should be noted that the PCL Renderer is very primitive and under 
developed when compared with the PDF Renderer.

Chris

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


Re: Spaces when rendering PCL format

2004-04-07 Thread Razvan Veina
The width of the column is much bigger than the width of the text. I guess
you're right about the deficiency of the PCL renderer because I made a very
interesting change that improved the look of my page: I changed the width of
my column with a small value, and like magic, the texts were displayed fine.
But now in some places of the same column the spaces seem to be much bigger
that a normal space... probably a strange way to calculate the position of
the texts... It's like when displaying a text composed from many words, each
word is displayed separately. Isn't it possible to treat these kinds of
texts like a single word maybe ?...
Anyway... I'm aware of the differences between the PCL and PDF renderer, but
I *MUST* get PCL output... that's life, I guess :)

Thank you.

- Original Message - 
From: Chris Bowditch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 4:11 PM
Subject: Re: Spaces when rendering PCL format


 Razvan Veina wrote:

fo:table-cell border-top-style=double border-top-width=1pt
  border-top-color=black
  fo:blockLine no/fo:block
  /fo:table-cell

 Can you make sure the width defined for the column is not smaller than the
 width of Line no Failing that its probably just a deficiency of the PCL
 Renderer. It should be noted that the PCL Renderer is very primitive and
under
 developed when compared with the PDF Renderer.

 Chris



 -
 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]



AW: Spaces when rendering PCL format

2004-04-07 Thread Jan Kohnert
add the white-space-collapse property into your block

fo:block white-space-collapse=false
bla bla
/fo:block


-Ursprüngliche Nachricht-
Von: Razvan Veina [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 7. April 2004 15:06
An: [EMAIL PROTECTED]
Betreff: Spaces when rendering PCL format


Hi everyone,

I'm having a strange problem when rendering PCL with FOP, and I wander if
anybody have an idea about this:
I have some kind of a table with some texts in it. The texts may contain one
ore more spaces inside. My problem is that some of the texts containing
spaces are displayed badly. And by badly I mean that the text after the
space is displayed over the ending of
the text before space. It's a little bit difficult to explain in words. It's
like instead of Line no I see Lineno, with no starting at the middle
of the e character. I noticed that the problem seems to appear so far only
on the first column of my table...

The code that displays a cell with problems is trivial :

fo:table-cell border-top-style=double border-top-width=1pt
border-top-color=black
fo:blockLine no/fo:block
/fo:table-cell

Any ideas ?
Thanx.


-
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]



Re: Spaces when rendering PCL format

2004-04-07 Thread Chris Bowditch
Razvan Veina wrote:
The width of the column is much bigger than the width of the text. I guess
you're right about the deficiency of the PCL renderer because I made a very
interesting change that improved the look of my page: I changed the width of
my column with a small value, and like magic, the texts were displayed fine.
But now in some places of the same column the spaces seem to be much bigger
that a normal space... probably a strange way to calculate the position of
the texts... It's like when displaying a text composed from many words, each
word is displayed separately. Isn't it possible to treat these kinds of
texts like a single word maybe ?...
Anyway... I'm aware of the differences between the PCL and PDF renderer, but
I *MUST* get PCL output... that's life, I guess :)
Patches to the PCL Renderer will be most welcome. But be aware that they wont 
be applied to the maintenance branch as this is now frozen.

Chris

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


losing spaces when using zero width space?

2004-01-15 Thread Jon Allen
Hello.
A while back you good folk taught me to use zero width spaces to allow my text 
to wrap as I needed it to.
Now I have discovered that spaces in my text are not showing up in the output.
Example: SzwsAzwsMzwsPzwsLzwsEzws zwsTzwsEzwsXzwsT
where zws is #x200b; 
(I know this is hard to read - sorry)
comes out as SAMPLETEXT
instead of SAMPLE TEXT.
I tried setting white-space-collapse property to false, but that didn't help.
Searched the archives to no avail.
Thanks for any help.
Jon


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



RE: losing spaces when using zero width space?

2004-01-15 Thread Jon Allen
Good suggestion - thanks.
Looks like the blanks are preserved during the transformation.
But then this line from the .fo file:
fo:inline(no 
description)/fo:inline
gets rendered into
(nodescription)
instead of
(no description)
What does this suggest to you?
I think as a workaround for now I will refrain from adding the zero width space 
on either side of a space character. That should work since the space will 
allow for any wrapping that might occur at that point in the text.
And if this looks like something in FOP that needs to be looked at, I would be 
happy to try and track it down.
Just let me know.
Thanks.
Jon

-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 15, 2004 1:23 PM
To: [EMAIL PROTECTED]
Subject: Re: losing spaces when using zero width space?


Jon Allen wrote:
 A while back you good folk taught me to use zero width spaces to allow 
 my text to wrap as I needed it to. Now I have discovered that spaces 
 in my text are not showing up in the output.
 Example: SzwsAzwsMzwsPzwsLzwsEzws zwsTzwsEzwsXzwsT
 where zws is #x200b; 
 (I know this is hard to read - sorry)
 comes out as SAMPLETEXT
 instead of SAMPLE TEXT.
 I tried setting white-space-collapse property to false, but that didn't help.

I guess the space is lost during XSLT. Run the transformation standalone and 
examine the FO file in order to check this.

J.Pietschmann

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



Re: losing spaces when using zero width space?

2004-01-15 Thread J.Pietschmann
Jon Allen wrote:
Looks like the blanks are preserved during the transformation.
But then this line from the .fo file:
fo:inline(no description)/fo:inline
gets rendered into
(nodescription)
instead of
(no description)
What does this suggest to you?
That's odd. Which FOP release are you using? What's the
value of text-align? Does it work if you use NBSP:
 translate(.,' ','#160;')
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: losing spaces when using zero width space?

2004-01-15 Thread Jon Allen
0.20.5
We're not setting text-align.
Using nbsp works.

-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 15, 2004 2:42 PM
To: [EMAIL PROTECTED]
Subject: Re: losing spaces when using zero width space?


Jon Allen wrote:
 Looks like the blanks are preserved during the transformation. But 
 then this line from the .fo file: fo:inline(no 
 descripti
 on)/fo:inline gets rendered into
 (nodescription)
 instead of
 (no description)
 What does this suggest to you?

That's odd. Which FOP release are you using? What's the
value of text-align? Does it work if you use NBSP:
  translate(.,' ','#160;')

J.Pietschmann


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



Score-spaces and stylesheet generated using Epic's Turbo Styler

2003-08-04 Thread Abhijit Junnare
Hi,
I have a few XML document. I have used EPIC Editor for
XML to create a stylesheet for these documents using
Epic's Turbo Styler. Now when I try to use this XSL
file along with XML document to generate PDF using FOP
it gives me an error. It says score-spaces not yet
supported
I guess that FOP does not support some constructs used
by EPIC. Is there anything I can do to configure FOP
so that it will recognize this or it will ignore such
attribute when it appears in the stylesheet.

But score-spaces attribute is a part of XSL
recommendation on the W3 site. I am wondering if
anyone came across such problem and has  solution to
fix it. If anyone using EPIC can help me so that the
Turbo Styler generates the stylesheet using only basic
XSL constructs.
Thanks,
Abhi

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Score-spaces and stylesheet generated using Epic's Turbo Styler

2003-08-04 Thread J.Pietschmann
Abhijit Junnare wrote:
it gives me an error. It says score-spaces not yet
supported
I guess that FOP does not support some constructs used
by EPIC. Is there anything I can do to configure FOP
so that it will recognize this or it will ignore such
attribute when it appears in the stylesheet.
No, unless you count changing the source and recompile.
J.Pietschmann

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


RE: Wrapping string (without spaces)...

2003-06-05 Thread Jamie Stillman
You can also use fo:block hyphenate=true language=en  area that
requires automatic wrapping /fo:block.  Choose the language of your choice
as specified by RFC3066.

- Jamie

-Original Message-
From: Roland Neilands [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 6:02 PM
To: [EMAIL PROTECTED]
Subject: RE: Wrapping string (without spaces)...


 How can i wrap a string(which has no spaces) inside a cell.
 Example, if i have string SanFrancisco. But the cell accommodate
 only 5 letter width. Then it has to wrap the word as 
 
 SanFr
 ancisco

Inserting zero width spaces at the right spot will trigger wrapping.
Search the archives of FOP user  XSL lists for zero width space, it's a
FAQ.
http://xml.apache.org/fop/maillist.html

Cheers,
Roland


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



Wrapping string (without spaces)...

2003-06-04 Thread Kodandapani A.
Hi,

How can i wrap a string(which has no spaces) inside a cell.
Example, if i have string SanFrancisco. But the cell accommodate
only 5 letter width. Then it has to wrap the word as 

SanFr
ancisco

Any idea, how to do this.

Thanks in advance
- KP


DISCLAIMER:
This message (including attachment if any) is confidential and may be 
privileged. Before opening attachments please check them for viruses and 
defects. MindTree Consulting Private Limited (MindTree) will not be responsible 
for any viruses or defects or any forwarded attachments emanating either from 
within MindTree or outside. If you have received this message by mistake please 
notify the sender by return  e-mail and delete this message from your system. 
Any unauthorized use or dissemination of this message in whole or in part is 
strictly prohibited.  Please note that e-mails are susceptible to change and 
MindTree shall not be liable for any improper, untimely or incomplete 
transmission.

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



TOC problem: FOP removing the spaces between words

2003-04-23 Thread Jon Steeves
Hello:

For some reason, when FOP handles the following xsl:fo it removes the space 
between PISO Interrupt -- the toc entry becomes one single word.


fo:block text-align-last=justify space-after=3pt start-indent=3em 
font-size=10pt font-family=Helvetica

  fo:basic-link internal-destination=IDASZX2C color=bluePISO 
Interruptfo:leader leader-pattern=dots /

fo:page-number-citation ref-id=IDASZX2C/

  /fo:basic-link

/fo:block

It is doing the same with all the other TOC entries.  Has anyone else run into 
this problem?

Cheers


Jon Steeves
Technical Communications
(604) 415-6053 ext. 2139
[EMAIL PROTECTED]


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



Re: TOC problem: FOP removing the spaces between words

2003-04-23 Thread J.Pietschmann
Jon Steeves wrote:
 For some reason, when FOP handles the following xsl:fo it removes the space
 between PISO Interrupt -- the toc entry becomes one single word.

 fo:block text-align-last=justify space-after=3pt start-indent=3em
 font-size=10pt font-family=Helvetica
 fo:basic-link internal-destination=IDASZX2C
  color=bluePISO Interruptfo:leader leader-pattern=dots /
 fo:page-number-citation ref-id=IDASZX2C/
 /fo:basic-link
 /fo:block

 It is doing the same with all the other TOC entries.  Has anyone else run
 into this problem?
I guess it has something to do with space justification. Which
FOP version are you using? You could check whether the lates CVS
code fixes this (0.20.5rc2 still wont do).
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Spaces

2003-01-28 Thread Clay Leeds
Miguel  Paulo,
Actually, I get errors when I use nbsp; in XSL-FO markup. I would have 
to set it up as an entity. However, when using the following line at the 
top of my XML document:

?xml version=1.0 encoding=UTF-8?
...I can use #160; as a space character (I believe it's non-breaking, 
too!), without problems. If you use an encoding attribute value other 
than UTF-8 you might need to use something else.

Hope this helps!
Web Maestro Clay
Miguel Angel Busto wrote:
You can use nbsp; special char instead of space char
-Original Message-
*From:* Joannes Capitanio [mailto:[EMAIL PROTECTED]
*Sent:* lunes, 27 de enero de 2003 13:22
*To:* [EMAIL PROTECTED]
*Subject:* Re: Spaces
try to use white-space-collapse=false property inside fo:block  
joannes

- Original Message - *From:* Paulo Gustavo Benfatti
mailto:[EMAIL PROTECTED] *To:* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] *Sent:* Monday, January 27,
2003 1:00 PM *Subject:* Spaces
Hi,   How can i add more than a space between two words in
fop:block tag ?   Thanks,   Paulo Benfatti Accenture - São Paulo
- Brazil

--
Clay Leeds - [EMAIL PROTECTED]
Web Developer - Medata, Inc. - http://www.medata.com
PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Spaces

2003-01-27 Thread Paulo Gustavo Benfatti



Hi,

 How can i add more than a space 
between two words in fop:block tag ?

Thanks,

Paulo Benfatti
Accenture - São Paulo - 
Brazil


Re: Spaces

2003-01-27 Thread Joannes Capitanio



try to use
white-space-collapse="false" property inside 
fo:block

joannes

  - Original Message - 
  From: 
  Paulo 
  Gustavo Benfatti 
  To: [EMAIL PROTECTED] 
  Sent: Monday, January 27, 2003 1:00 
  PM
  Subject: Spaces
  
  Hi,
  
   How can i add more than a 
  space between two words in fop:block tag ?
  
  Thanks,
  
  Paulo Benfatti
  Accenture - São Paulo - 
Brazil


Repost: Spaces and Precedences

2003-01-26 Thread Stefan . Wachter
Hi all.

Last April there was a discussion in this list (started by Ralf Steppacher)
about spaces and precedences. The discussion considered the situation:

fo:block space-after=20pt space-after.precedence=1line 1/fo:block
fo:block space-before=10pt space-before.precedence=0line 2/fo:block

and the question if there should be a space of 20pt or 30pt between the
lines.

Unfortunately the former discussion fizzled, i.e. yielded no conclusion.
Reading the spec and in particular the example 6.5.1.1 I think that the correct
answer is 20pt. However, FOP seems to add the spaces, i.e. inserts a 30pt
space.

Can FOP somehow get convinced to render only 20pt space between the lines?

--Stefan


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



Re: Repost: Spaces and Precedences

2003-01-26 Thread J.Pietschmann
[EMAIL PROTECTED] wrote:
...
fo:block space-after=20pt space-after.precedence=1line 1/fo:block
fo:block space-before=10pt space-before.precedence=0line 2/fo:block
...
Can FOP somehow get convinced to render only 20pt space between the lines?
No. FOP currentlz does not implement space conditionality, precedences
and space collapsing. It unconditionally applies all space specifications.
You'll have to modify your XSLT to get the spaces you want.
J.Pietschmann

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


Re: Line spaces when different font sizes are used

2003-01-21 Thread Ramon Maria Gallart









FOP doesn't support mixing different font sizes within one line.





J.Pietschmann





Ok. But although FOP
doesnt support this feature, is there any kind of solution to solve
that? I dont think about me to be the first one havig this kind of
problem. Usually the text comes from a HTML-like text, one possible solution
could be parse the text looking for size tags referred to the
font used. But surely there would be a lot of searching making it an
inefficient way to solve the problem.



Any suggerence is
welcome.



Thanks.



Ramon
 Maria Gallart








Re: Line spaces when different font sizes are used

2003-01-21 Thread Jeremias Maerki
Try the line-height property on fo:block.

On 21.01.2003 08:56:32 Ramon Maria Gallart wrote:
  FOP doesn't support mixing different font sizes within one line.
  
  J.Pietschmann
  
  
 Ok. But although FOP doesn't support this feature, is there any kind of
 solution to solve that? I don't think about me to be the first one havig
 this kind of problem. Usually the text comes from a HTML-like text, one
 possible solution could be parse the text looking for 'size' tags
 referred to the font used. But surely there would be a lot of searching
 making it an inefficient way to solve the problem.
  
 Any suggerence is welcome.


Jeremias Maerki


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



Line spaces when different font sizes are used

2003-01-20 Thread Ramon Maria Gallart








 Hi all. Weve got a problem using fop to format a
paragraph. The thing is that when we try to put a text inside a paragraph, we
get the undesired result as seen in the image attached. What can i do to set
the space between lines as best as possible?



 Heres the code used to show the comment:



 !-- COMENTARIOS --

 xsl:template match=frame/comentari

 fo:block font-size=12pt text-align=center font-weight=bold padding-bottom=10px font-family=ComicSansMS

 xsl:value-of select=titulo/

 /fo:block

 fo:block text-align=justify text-indent=15pt space-after=20pt

 xsl:apply-templates select=texto/

 /fo:block

 /xsl:template



 It happens that inside the same paragraph there can be different font
sizes, so i just dont know what to do to fix it.



 Heres the
generated FO:



 fo:table text-align=start table-layout=fixed

 fo:table-column column-width=18cm/

 fo:table-body

 fo:table-row keep-together=always

 fo:table-cell

 fo:block padding-bottom=10px font-weight=bold text-align=center font-size=12ptSusp. neg.
ENACO/fo:block

 fo:block space-after=20pt text-indent=15pt text-align=justify

 fo:inline font-size=8pt

 fo:block#13; fo:inline color=#00 font-size=12ptLa /fo:inline

 fo:inline font-weight=bold

 fo:inline color=#00 font-size=12pt#13;
Direccin General de Mercados e Inversores/fo:inline

 /fo:inline

 fo:inline color=#00 font-size=12pt#13; eleva la siguiente propuesta motivada de
suspensin de la negociacin al #13; Presidente
de la Comisin Nacional del Mercado de Valores, quien en #13; virtud de
la delegacin de facultades otorgada por el Consejo de la #13;
Comisin Nacional con fecha 9 de octubre de 2002,
acuerda:#13; /fo:inline

 /fo:block

 fo:block   /fo:block#13; fo:block#13; fo:inline color=#00 font-size=12pt#13; /fo:inline

  /fo:block

 fo:block   /fo:block#13; fo:block#13; fo:inline color=#00 font-size=12ptfo:inline font-style=italicSuspender
cautelarmente, con #13; efectos
inmediatos, al amparo del Artculo 33 de la Ley 24/1988, de 28
#13;
de julio, del Mercado de Valores, la negociacin en el Sistema de
#13;
Interconexin Burstil de las acciones, u otros valores
que den derecho #13; a su
suscripcin o adquisicin, de la entidad ENACO, S.A., por
concurrir #13;
circunstancias que pudieran perturbar el normal desarrollo de las
#13;
operaciones sobre los citados valores./fo:inline/fo:inline#13; /fo:block

 fo:block   /fo:block

 /fo:inline

 /fo:block

 /fo:table-cell

 /fo:table-row

 /fo:table-body

 /fo:table





 Any help would be
appreciated.



 Thanks.



 Ramon Maria Gallart.










RE: Line spaces when different font sizes are used

2003-01-20 Thread Ramon Maria Gallart








Sorry.



Heres the attached image.



 Thanks,



 Ramon Maria Gallart






attachment: pdf_out.jpg-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Line spaces when different font sizes are used

2003-01-20 Thread Jeremias Maerki
Can you please attach (!) a complete XSL-FO sample (preferably zipped) so
we can reproduce? It's very awesome to scratch together a testfile from
inline code snippets. Thanks a lot for making our lifes easier.

And please indicate the version of FOP you're running. If you're running
0.20.3 or earlier I strongly suggest you upgrade.

On 20.01.2003 19:16:38 Ramon Maria Gallart wrote:
Hi all. We've got a problem using fop to format a paragraph. The thing is 
 that when we try to put a text inside a paragraph, we get the undesired 
 result as seen in the image attached. What can i do to set the space between 
 lines as best as possible?
  
Here's the code used to show the comment:

snip/

It happens that inside the same paragraph there can be different font 
 sizes, so i just don't know what to do to fix it.
  
Here's the generated FO:

snip/


Jeremias Maerki


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



Re: Line spaces when different font sizes are used

2003-01-20 Thread J.Pietschmann
Ramon Maria Gallart wrote:
   It happens that inside the same paragraph there can be different font 
sizes, so i just dont know what to do to fix it.
FOP doesn't support mixing different font sizes within one
line.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Spaces after xsl:value-of

2002-11-20 Thread Scherler, Thorsten
Hello group,

I have a problem:
fo:block padding-before=24pt
xsl:apply-templates select=//body/xsalutation/
xsl:value-of select=./ap/salutation/textxsl:value-of 
select=./ap/surname/,/fo:block

will return:
Guten Tag Herr Scherler ,

But I want to have: 
Guten Tag Herr Scherler,

So I tried the following:
fo:block padding-before=24pt
xsl:apply-templates select=//body/xsalutation/
xsl:value-of select=./ap/salutation/textxsl:value-of 
select=./ap/surname/fo:inline start-indent=-.25cm 
white-space-treatment=ignore,/fo:inline /fo:block

But still it's not working! I also tried with white-space...
...no success

Thanks in advance for any help.

 Mit freundlichem Gruss,
 
 Thorsten Scherler
 Marketing / Telefonmarketing
 
 Weidmüller GmbH  Co.
 P.O. Box 2807
 33058 Paderborn
 Tel.:+ 49 - 5252-960-350
 Fax:+ 49 - 5252-960-116
 eMail: [EMAIL PROTECTED]
 http://www.weidmueller.de
 
 


Newbie question - underlining blank spaces.

2002-05-08 Thread Jack Donohue
Hi all.

Is there any way to force FOP to underline a string, even if it is composed
entirely of blank characters? I'm using fop-0.20.3, if that matters.


I have a template which produces an underlined, fixed-length string in my
pdf doc. It pads the string with spaces if necessary to make it the desired
length. It works great, and a I get a padded string in the pdf document with
the required length and everything is underlined. Great :-)


The problem is when the string is composed entirely of blank spaces ... The
string has the correct number of blank characters
(white-space-collapse=false), but the string is not underlined.


Is there a way to force FOP to underline a string, even if it is composed
entirely of blank characters? 


Thanks for any help.



Here is the template:


  !-- *** this is the format I want to use to display the string --
  xsl:attribute-set name=dataText
xsl:attribute name=font-familyCourier/xsl:attribute
xsl:attribute name=font-size9pt/xsl:attribute
xsl:attribute name=font-stylenormal/xsl:attribute
xsl:attribute name=font-weightnormal/xsl:attribute
xsl:attribute name=languageen-US/xsl:attribute
xsl:attribute name=text-decorationunderline/xsl:attribute
xsl:attribute name=white-space-collapsefalse/xsl:attribute
  /xsl:attribute-set






  !-- recursive template to pad a string with blanks --
  xsl:template name=append-pad
!-- the value with whatever padChar is passed in   --
xsl:param name=padCharxsl:value-of select=' '//xsl:param
xsl:param name=padVar/
xsl:param name=length/
xsl:choose

  !--  check here to see if the padVar is nil --

  xsl:when test=boolean($padVar)
xsl:choose
  xsl:when test=string-length($padVar) lt; $length
xsl:call-template name=append-pad
  xsl:with-param name=padChar select=$padChar/
  xsl:with-param name=padVar
select=concat($padVar,$padChar)/
  xsl:with-param name=length select=$length/
/xsl:call-template
  /xsl:when
  xsl:otherwisefo:inline
xsl:use-attribute-sets=dataTextxsl:value-of
select=concat(substring($padVar,1,$length),'#160;')//fo:inline/xsl:ot
herwise
/xsl:choose
  /xsl:when


  !-- *** if the padVar is nil, make a string of entirely blank space
*** --

  xsl:otherwise
xsl:call-template name=append-pad
  xsl:with-param name=padChar select=$padChar/
  xsl:with-param name=padVar select='#160;'/
  xsl:with-param name=length select=$length/
/xsl:call-template
  /xsl:otherwise
/xsl:choose
  /xsl:template





--
Jack Donohue, Developer
Synovation Incorporated.
Providing integrated solutions for criminal justice.
--
Tel 209.491.0978 x 409
Fax 209.571.8853
Support 209.491.3600
Toll Free 800.774.8430
--
http://www.synovation.com
http://support.synovation.com
 


Re: Newbie question - underlining blank spaces.

2002-05-08 Thread J.Pietschmann
Jack Donohue wrote:
Is there any way to force FOP to underline a string, even if it is composed
entirely of blank characters? I'm using fop-0.20.3, if that matters.
Try something which results in
  fo:inline text-decoration=underline#x005F;   
#160;/fo:inline
The first is the underline character, the last a non breaking
space.
J.Pietschmann


Re: Spaces and precedence

2002-04-26 Thread Ralf Steppacher
Hi.
Here is the (pruned) FO I get as an result of my xsl transformation.
What I wanted to do was suppress additional space between two headlines 
that directly follow each other.

fo:flow flow-name=xsl-region-body
!-- preceeding blocks --
!-- block one --
fo:block break-before=page id=h1_6 space-before=50pt
 space-after=20pt space-after.precedence=1
7.Leistungsspektrum
/fo:block
!-- block two --
fo:block space-before.minimum=0pt space-before.precedence=2
 id=h2_1 space-after=20pt space-before=50pt
7.1 Einzelplatzscanner
/fo:block
!-- succeeding blocks --
/fo:flow
Block one := A
Block two := B
My understanding of the spec:
A and B are stackable areas, have no borders or padding and are not 
reference-areas (block-progression-direction inherited from parent, no 
indents specified).

A and B have a block stacking constraint S according to rule 3a. in 
chapter 4.2.5

Space Resolution:
S1 := space-after=20pt precedence=1
S2 := space-before=50pt precedence=2
S'' := S1 and S2
In this case: S' == S'' because S'' does not contain line-area traits.
The resolved space-specifier S would suppress S1 because it has a lower 
precedence than S2 (point 3 in 4.3.1).

Do I get that right? FOP would not suppress anything and just add all 
spaces.

TIA!
Ralf



RE: Spaces and precedence

2002-04-25 Thread Arved Sandstrom
Joerg, it's the diagrams that accompany Section 4.2.5 that make things
halfway understandable. They have an diagrammed example of each clause.

There are also some key statements in the first paragraph of 4.2.5 - namely,
that the definitions are recursive, and, that the entire point of the
definitions is to identify areas that have only spaces between them. So
actually I was also half-incorrect, because I spoke too hastily; with
respect to the situation with _siblings_ and their space-after/space-before,
the borders  padding do _not_ have to have zero width.

Even where borders and padding have non-zero width they may have a
conditionality of discard, in which case under certain conditions they
look like they have zero width for space-resolution purposes.

Arved

 -Original Message-
 From: J.Pietschmann [mailto:[EMAIL PROTECTED]
 Sent: April 24, 2002 9:10 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Spaces and precedence


 Arved Sandstrom wrote:
  Assuming Western reference-orienattion and writing mode, clause 3a of
  Section 4.2.5 indicates that if the border-after-width and
 padding-after of
  the first block are zero, and the border-before-width and
 padding-before of
  the second block are zero, that we have a block-stacking constraint.
 
  In which case the precedence on the space-fater of the one and the
  space-before of the other can be used precisely to achieve this
 collapsing
  effect.

 Thanks for the correction. I'll reread the spec again.

 J.Pietschmann






RE: Spaces and precedence

2002-04-24 Thread Arved Sandstrom
 -Original Message-
 From: J.Pietschmann [mailto:[EMAIL PROTECTED]
 Sent: April 24, 2002 5:17 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Spaces and precedence

 Ralf Steppacher wrote:
  I have a short question about spaces and precedences:
  What I want is to suppress additional space if one headline directly
  follows another.
 
  To achieve this I wrote the template with FOs below but it does
 not work
  (I played a bit with attributes and values and could not find any other
  working solution using precendences). Could anybody please tell me
  whether my FO is wrong or this is a limitation of FOP?

 After having read the spec several times, i got the impression
 that space-*.precedence is for prioritizing space reservations
 coming from stuff from the same area.

 Roughly:
fo:block space-before=10pt precedence=1
  fo:block space-before=5pt precedence=2
stuff
 ...
 will put stuff 5pt after preceding content.

 This means, precedence can't be used to collapse space-after
 and space-before of consecutive blocks.

Assuming Western reference-orienattion and writing mode, clause 3a of
Section 4.2.5 indicates that if the border-after-width and padding-after of
the first block are zero, and the border-before-width and padding-before of
the second block are zero, that we have a block-stacking constraint.

In which case the precedence on the space-fater of the one and the
space-before of the other can be used precisely to achieve this collapsing
effect.

Regards,
Arved Sandstrom



RE: Spaces and precedence

2002-04-24 Thread Arved Sandstrom
 -Original Message-
 From: Arved Sandstrom [mailto:[EMAIL PROTECTED]
 Sent: April 24, 2002 6:38 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Spaces and precedence


  -Original Message-
  From: J.Pietschmann [mailto:[EMAIL PROTECTED]
  Sent: April 24, 2002 5:17 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Spaces and precedence
 
  Ralf Steppacher wrote:
   I have a short question about spaces and precedences:
   What I want is to suppress additional space if one headline directly
   follows another.
  
   To achieve this I wrote the template with FOs below but it does
  not work
   (I played a bit with attributes and values and could not find
 any other
   working solution using precendences). Could anybody please tell me
   whether my FO is wrong or this is a limitation of FOP?
 
  After having read the spec several times, i got the impression
  that space-*.precedence is for prioritizing space reservations
  coming from stuff from the same area.
 
  Roughly:
 fo:block space-before=10pt precedence=1
   fo:block space-before=5pt precedence=2
 stuff
  ...
  will put stuff 5pt after preceding content.
 
  This means, precedence can't be used to collapse space-after
  and space-before of consecutive blocks.

 Assuming Western reference-orienattion and writing mode, clause 3a of
 Section 4.2.5 indicates that if the border-after-width and
 padding-after of
 the first block are zero, and the border-before-width and
 padding-before of
 the second block are zero, that we have a block-stacking constraint.

 In which case the precedence on the space-fater of the one and the
 space-before of the other can be used precisely to achieve this collapsing
 effect.

 Regards,
 Arved Sandstrom


Read orientation and space-after :-)

orienattion is one of my top mistyping words (like retrun), but fater
is new. :-) Normally I don't have 2 in one post. Drives me nuts.

AHS



Spaces and precedence

2002-04-17 Thread Ralf Steppacher
Hi all.
I have a short question about spaces and precedences:
What I want is to suppress additional space if one headline directly 
follows another.

To achieve this I wrote the template with FOs below but it does not work 
(I played a bit with attributes and values and could not find any other 
working solution using precendences). Could anybody please tell me 
whether my FO is wrong or this is a limitation of FOP?

Thank you in advance!
Ralf
PS.: I know that I might just leave out the space-after of the top level 
headline. :-)


xsl:template match=products
fo:block font-family=serif font-style=normal font-weight=bold
font-size=16pt space-before=50pt space-after=20pt
space-after.precedence=0 space-after.minimum=0pt
id=[EMAIL PROTECTED]
xsl:number count=//[EMAIL PROTECTED] format=1./
xsl:value-of select=./prolog/title/
/fo:block
xsl:for-each select=./product
fo:block font-family=serif font-style=normal
font-weight=bold font-size=12pt
space-before=30pt space-after=20pt id=[EMAIL PROTECTED]
space-before.precedence=10
space-before.minimum=0pt
xsl:number count=//[EMAIL PROTECTED] level=multiple
format=1.1. /
xsl:value-of select=./prolog/title/
/fo:block
xsl:apply-templates select=product_info/
!-- etc. ... --
/xsl:for-each
/xsl:template



RE: possible to specify required spaces?

2002-04-01 Thread Buonincontri, Steve (CAP, MMF, ITSS)

This is a great subject. I recently struggled quite a bit with this problem.

RTF2FO and FO to FOP gave me loads of problems with whitespaces. I am ready to 
give up.

- sb

-Original Message-
From: Craeg K Strong [mailto:[EMAIL PROTECTED]
Sent: Friday, March 22, 2002 1:45 PM
To: [EMAIL PROTECTED]
Subject: Re: possible to specify required spaces?


Can you use fo:leader?

Check out  http://www.renderx.com/Tests/leader.fo

HTH,

--Craeg

[EMAIL PROTECTED] wrote:

Does anyone know a way to pass required spaces through FOP from XML to a
PDF?

The normal processing of x'20' spaces collapses adjacent spaces to
eliminate extra white space, which is normally good but not in all cases,
and 'white-space-treatment=pre' (which would preserve these) isn't
implemented yet.

Does anyone know, for example, of another way to preserve these or else
another blank non-printing character that we could use in the  XML file for
spaces we want to preserve?

Thanks for any advice!




-- 
Craeg K Strong, General Partner
Ariel Partners LLC
http://www.arielpartners.com
voice 781-647-2425
fax   781-647-9690

NOTICE: This message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any review,
retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than
the intended recipient is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all
copies -- including electronic copies -- of the original message.




RE: possible to specify required spaces?

2002-04-01 Thread Scott Moore
I use fo:block white-space-collapse=false which preserves spaces and
works great with FOP.

Scott


-Original Message-
From: Buonincontri, Steve (CAP, MMF, ITSS)
[mailto:[EMAIL PROTECTED]
Sent: Monday, April 01, 2002 5:51 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: possible to specify required spaces?



This is a great subject. I recently struggled quite a bit with this problem.

RTF2FO and FO to FOP gave me loads of problems with whitespaces. I am ready
to give up.

- sb

-Original Message-
From: Craeg K Strong [mailto:[EMAIL PROTECTED]
Sent: Friday, March 22, 2002 1:45 PM
To: [EMAIL PROTECTED]
Subject: Re: possible to specify required spaces?


Can you use fo:leader?

Check out  http://www.renderx.com/Tests/leader.fo

HTH,

--Craeg

[EMAIL PROTECTED] wrote:

Does anyone know a way to pass required spaces through FOP from XML to a
PDF?

The normal processing of x'20' spaces collapses adjacent spaces to
eliminate extra white space, which is normally good but not in all cases,
and 'white-space-treatment=pre' (which would preserve these) isn't
implemented yet.

Does anyone know, for example, of another way to preserve these or else
another blank non-printing character that we could use in the  XML file for
spaces we want to preserve?

Thanks for any advice!




-- 
Craeg K Strong, General Partner
Ariel Partners LLC
http://www.arielpartners.com
voice 781-647-2425
fax   781-647-9690

NOTICE: This message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any review,
retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than
the intended recipient is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all
copies -- including electronic copies -- of the original message.



Re: possible to specify required spaces?

2002-03-26 Thread Craeg K Strong
Can you use fo:leader?
Check out  http://www.renderx.com/Tests/leader.fo
HTH,
--Craeg
[EMAIL PROTECTED] wrote:
Does anyone know a way to pass required spaces through FOP from XML to a
PDF?
The normal processing of x'20' spaces collapses adjacent spaces to
eliminate extra white space, which is normally good but not in all cases,
and 'white-space-treatment=pre' (which would preserve these) isn't
implemented yet.
Does anyone know, for example, of another way to preserve these or else
another blank non-printing character that we could use in the  XML file for
spaces we want to preserve?
Thanks for any advice!

--
Craeg K Strong, General Partner
Ariel Partners LLC
http://www.arielpartners.com
voice 781-647-2425
fax   781-647-9690
NOTICE: This message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any review,
retransmission, dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities other than
the intended recipient is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all
copies -- including electronic copies -- of the original message.



Does pdf ignore leading spaces?

2002-03-24 Thread Jens Khnberger
 Hi,
I got the problem that one of my servlets creates a very big pdf from 
database, which can take several minutes. To not waist ressources, I 
want to detect if the user pressed the stop button. The only way to do 
that, as far as I know, is to stream a space or a bit and check if there 
is an IOException. So, does a pdf file ignore leading spaces or bits at 
the beginning or is it impossible to check if the user pressed the stop 
button?




possible to specify required spaces?

2002-03-22 Thread peter . dykstra

Does anyone know a way to pass required spaces through FOP from XML to a
PDF?

The normal processing of x'20' spaces collapses adjacent spaces to
eliminate extra white space, which is normally good but not in all cases,
and 'white-space-treatment=pre' (which would preserve these) isn't
implemented yet.

Does anyone know, for example, of another way to preserve these or else
another blank non-printing character that we could use in the  XML file for
spaces we want to preserve?

Thanks for any advice!




Re: AW: possible to specify required spaces?

2002-03-22 Thread peter . dykstra

This works great -- thanks!




  
S. 
  
Jayaraman   To: [EMAIL PROTECTED]

[EMAIL PROTECTED]cc:   
   
onsor.chSubject: AW: possible to specify 
required
 spaces?
  
03/22/2002  
  
01:33 PM
  
Please  
  
respond to  
  
fop-user
  

  

  



Try #160;
In most fonts, this appears as a space.
In some fonts, it gives some funny symbols.
Cheers
Jay


**
[EMAIL PROTECTED] wrote:

Does anyone know a way to pass required spaces through FOP from XML to a
PDF?

The normal processing of x'20' spaces collapses adjacent spaces to
eliminate extra white space, which is normally good but not in all cases,
and 'white-space-treatment=pre' (which would preserve these) isn't
implemented yet.

Does anyone know, for example, of another way to preserve these or else
another blank non-printing character that we could use in the  XML file for
spaces we want to preserve?

Thanks for any advice!