RE: Running the included XSL

2006-09-13 Thread Pascal Sancho
 -Original Message-
 From: Susanta Dash [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, September 12, 2006 10:55 PM
  
 I posted my query on fop-users, but not sure anyone received 
 or it's the right place for it or not! Can anyone let me 
 know. Here is my problem:
  
 Here is the problem I'm facing while rendering it in FOP. 
 I've two rows, first one has 3 columns and the next has 2 
 columns. The text within these rows need to be flowed to the 
 next column. Like for example: I've ABC as text, in this 
 scenario I want the text to be arranged as A in column1, B in 
 column2 and C in column3. The same thing for the second row. 
 I tried to arrange the text below, hope it's viewable:
 
 
 | A | B | C |
 
 |  X   |  Y  |
 
 
 I also tried to set column-count in fo:region-body at page 
 level, where i can set either to 2 or 3, which is not helpful.
 
 Suggestions are highly appreciated.
 
 Thanks.
 
 Susant.

Hi,
If I understand correctly, you want to flow your text in columns A, then
B, then C, and an other flow through X, then Y.

In this case, you have to wait XSL-FO 1.1 multiple fo:flow
implementation, which is not yet in the road map...

As a workaround, you can try to play with fo:block-container in absolute
position, but you have to cut the flow-text yourself.

Pascal

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



Re: formatting tables

2006-09-13 Thread paul
Jeremias Maerki dev at jeremias-maerki.ch writes:

 
 As Pascal already hinted, you'll have to use
background-color=from-table-column()
 on each table-cell to apply the background color of a table-column to
 each cell of that column. 

so I'm trying, but it doesn't seem to work... I get neither a blue cell, nor an
error message. Did I do something wrong?

---
fo:table table-layout=fixed width=100%
fo:table-column column-number=1 column-width=20% background-color=blue/
fo:table-column column-number=2 column-width=80%/

fo:table-body
fo:table-row
fo:table-cell column-number=1 background-color=from-table-column()
fo:block text-align=rightTeilprojekt/fo:block
/fo:table-cell
(...)


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



Make Landscape default orientation

2006-09-13 Thread pavithra atrangada
HelloHow to make orientation default to Landscape using FOP while printingPlease help me out.ThanksPavithra


color and inherited-property-value()

2006-09-13 Thread Pascal Sancho
Hi,
While teting %FOP_TRUNK%/examples/fo/basic/inhprop.fo,

Line#137: color='inherited-property-value(background-color)'
seems to not work properly:
Color property gets the color inherited value
 
Pascal

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



Loading external graphic from base url set with ServletContextURIResolver

2006-09-13 Thread Kai Mütz
Hi,

there is an issue with ServletContextURIResolver which I do not really
understand. It is not really a problem, because everything works fine
excepting an error message in log file. Thus this mailing is more or less an
information.

I initialize fop with the following code:

Fop fop = null;
FopFactory fopFactory = FopFactory.newInstance();
if (context != null) {
fopFactory.setURIResolver(new ServletContextURIResolver(context));
}
try {
if (configURI != null) {
try {
fopFactory.setUserConfig(configURI);
} catch (SAXException e) {
getLogger().warn(Can not set FOP user config!, e);
}
}
fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);
} catch (Exception e) {
getLogger().error(Can not create FOP instance!, e);
}

And have configured base and font-base in conf file:

fop version=1.0
  !-- Base URL for resolving relative URLs --
  baseservlet-context://base
  font-baseservlet-context:/WEB-INF/fonts//font-base
  .´
/fop


As mentioned above everything works fine, i.e. the images relative to base
and the fonts relative to font-base are found. BUT if i serialize a PDF with
an external-graphic included the following error ist logged:

ERROR (FOURIResolver.java:210) - Error with base URL servlet-context:/):
unknown protocol: servlet-context

with Stacktrace:

java.net.MalformedURLException: unknown protocol: servlet-context
at java.net.URL.init(URL.java:574)
at java.net.URL.init(URL.java:464)
at java.net.URL.init(URL.java:413)
at
org.apache.fop.apps.FOURIResolver.toBaseURL(FOURIResolver.java:206)
at org.apache.fop.apps.FOURIResolver.resolve(FOURIResolver.java:90)
at org.apache.fop.apps.FopFactory.resolveURI(FopFactory.java:628)
at org.apache.fop.apps.FOUserAgent.resolveURI(FOUserAgent.java:421)
at org.apache.fop.apps.FOUserAgent.resolveURI(FOUserAgent.java:395)
at
org.apache.fop.image.ImageFactory.loadImage(ImageFactory.java:190)
at org.apache.fop.image.ImageLoader.loadImage(ImageLoader.java:56)
at
org.apache.fop.image.ContextImageCache.getImage(ImageFactory.java:432)
at org.apache.fop.image.ImageFactory.getImage(ImageFactory.java:157)
at
org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:68)
at org.apache.fop.fo.FObj.processNode(FObj.java:118)


I don't know why the FOURIResolver is used here. Anyone does? Again: the
external graphic is found.

Regards, Kai


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



RE: Re: formatting tables

2006-09-13 Thread Pascal Sancho
 -Original Message-
 From: paul [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 13, 2006 10:20 AM
 
 Jeremias Maerki dev at jeremias-maerki.ch writes:
 
  As Pascal already hinted, you'll have to use
 background-color=from-table-column()
  on each table-cell to apply the background color of a 
 table-column to 
  each cell of that column.
 
 so I'm trying, but it doesn't seem to work... I get neither a 
 blue cell, nor an error message. Did I do something wrong?
 
 ---
 fo:table table-layout=fixed width=100% fo:table-column 
 column-number=1 column-width=20% 
 background-color=blue/ fo:table-column column-number=2 
 column-width=80%/
 
 fo:table-body
 fo:table-row
 fo:table-cell column-number=1 
 background-color=from-table-column()
 fo:block text-align=rightTeilprojekt/fo:block
 /fo:table-cell
 (...)

Hmm,
I tried it successfully with latest FOP_TRUNK,
But was unsuccessful with FOP 0.92.

I think your only alternative is ... to upgrade

Pascal

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



Re: outputting TIFF-G images

2006-09-13 Thread Oliver Hernàndez Valls

Sorry if these questions are too obvious.


En/na Jeremias Maerki ha escrit:

One more thing: The TIFFRenderer currently uses the internal codecs from
XML Graphics Commons to encode TIFF images. 


I understand you are talking about 
org.apache.xmlgraphics.image.codec.tiff.TIFFImageEncoder in the method 
stopRenderer()


These do not support writing

CCITT-G4 encoded images. We could switch to the ImageWriters I wrote for
Batik and which are now available in XML Graphics Commons. They allow an
abstraction from the underlying codec for image writing. There are
implementations of the ImageWriter that write images through ImageIO


ImageIOTIFFImageWriter?


which might have CCITT-capable codecs available but the code will have
to be extended to choose the compression algorithm. 


So you're talking about subclassing ImageIOTIFFImageWriter (into batik 
or into fop?) or adding code into? to use, for example, TIFFFaxDecoder?


All in all, no easy

solution to your requirement but certainly not much more than half a day
of work.

On 10.09.2006 12:54:46 Jeremias Maerki wrote:

There's a configuration value you can set to modify the compression used
but it's poorly designed (requiring an integer value) and undocumented.
Furthermore, it does not support setting CCITT-G4 compression.
Generating monochrome (1bit) images has also not been implemented, yet.

To implement all this, changes would have to be made in:
- Java2DRenderer.getPageImage(): Extract code into a protected method to
instantiate the BufferedImage that we paint on. Right now, it always
allocates an 24 bit RGB image with an 8-bit alpha channel.


OK


- TIFFRenderer.LazyPageImagesIterator.next(): Code to handle 1bit images.


Uncoment the code for TIFFEncodeParam.COMPRESSION_GROUP4? simply return 
the BufferedImage generated in the protected method above (I think is 
this one)? or some other hack?



- TIFFRenderer.configure(): provide better configuration using names for
compression methods.


What does this method does or have to do? I don't undertand why this 
method exists. It's reason is to log the compression?



- Override the new protected method described above to create the
Buffered image depending on the configuration.


OK



If you don't want to hack FOP code, the work-around is to convert the
generated TIFF file after generation to CCITT format somehow. Obvious,
isn't it? :-)

On 08.09.2006 11:04:22 Oliver Hernàndez Valls wrote:

Hi all,
	I'm working with fop to generate MTIFF text images. At the moment i'm 
using fop-trunk because no justification functionality is working in fop 
0.92 for tiffs.
	Right now I've all the functionality to generate parametrized text 
images implemented. By default fop uses packbits compression and colored 
image coding.
	I'd like to change the tiff coding to TIFF-G because generated images 
with the default tiff coding are very big (around 9000 kB) and 
coloration is not needed for the images I'm generating.
	I'm using the new FOUserAgent parameter setTargetResolution(int), but 
I can't see any way to change the default encoding for tiff images.
	Some time ago I readed this somewhere in the source code: //TODO 
Support output of monochrome bitmaps (fax-style), but don't know if it 
has something to do with changing tiff coding.


Any hint/workarround/documentation please?

Thanks a lot, salut / cheers !


Jeremias Maerki



Jeremias Maerki


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




Thanks a lot!

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



JAXP and docbook-xsl Stylesheets

2006-09-13 Thread Don Adams

I am trying to use the JAXP Transformer in my Java code
to translate valid docbook article XML 
into valid XHTML and FO XML. I am having a major problem with
the use of the non-breaking space code #160; in
the docbook-xsl stylesheets. The cause of the problem 
is perfectly described under 5. Be careful with 
nonbreaking spaces on this web page:

http://www.oreillynet.com/pub/a/oreilly/java/news/javaxslt_0801.html

To summarize, special characters in the docbook-xsl
stylesheets are transformed into the actual special characters
in the output of the transformation when the transformation
method is selected as xml.  So, for example, when
a transformation is done into FO XML, a table title in the
FO XML output contains Table 1. x; however, the spaces
after the word Table and after 1. are not the ASCII space 
character, they are a single character code 160
(a non-breaking space) which is not valid in an XML file.
From everything I've read, it seems like this is the
correct behavior and other transformers such as xsltproc
replace the single character codes with ASCII characters
on their own as a post process.

For XHTML, I set the output method to html instead of
xml for the Transformer.  This generated nbsp; in
the output instead of the single character code 160. This is
acceptable for me because browsers will display the output
of the transformation even though it is not technically valid XHTML.

For FO XML, I don't see a work-around for the problem
other than hand-modifying the docbook-xsl stylesheets
to either replace all the special characters with a
valid ASCII character, or use the disable-output-escaping
XSL attribute (which looks very difficult and support for
this attribute is not a requirement of XSLT processors).

Does anyone have any comments or suggestions?

Thanks,
Don

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



Re: outputting TIFF-G images

2006-09-13 Thread Oliver Hernàndez Valls

Hi Jeremias,
I've been working a little with your suggestions.
What I have done is this little work:
1 -Extract code into a protected method to instantiate the BufferedImage 
that we paint on. This methods signature is:


protected BufferedImage getBufferedImage(int bitmapWidth, int bitmapHeight)

2- Modify TIFFRenderer.configure() for selecting the BufferedImage type 
in a new attribute.


3- Override the new protected method described above to create the
Buffered image depending on the configuration.

Here you are the code:


Java2DRenderer
//
//
//
/*
 * Copyright 1999-2006 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* $Id: Java2DRenderer.java 410308 2006-05-30 15:53:12Z jeremias $ */

package org.apache.fop.render.java2d;

// Java
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.color.ColorSpace;
import java.awt.font.GlyphVector;
import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.ComponentColorModel;
import java.awt.image.DataBuffer;
import java.awt.image.DataBufferByte;
import java.awt.image.PixelInterleavedSampleModel;
import java.awt.image.Raster;
import java.awt.image.SampleModel;
import java.awt.image.WritableRaster;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Stack;

import org.w3c.dom.Document;

import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.area.CTM;
import org.apache.fop.area.PageViewport;
import org.apache.fop.area.Trait;
import org.apache.fop.area.inline.Image;
import org.apache.fop.area.inline.InlineArea;
import org.apache.fop.area.inline.Leader;
import org.apache.fop.area.inline.SpaceArea;
import org.apache.fop.area.inline.TextArea;
import org.apache.fop.area.inline.WordArea;
import org.apache.fop.fo.Constants;
import org.apache.fop.fonts.Font;
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.fonts.Typeface;
import org.apache.fop.image.FopImage;
import org.apache.fop.image.ImageFactory;
import org.apache.fop.image.XMLImage;
import org.apache.fop.render.AbstractPathOrientedRenderer;
import org.apache.fop.render.Graphics2DAdapter;
import org.apache.fop.render.RendererContext;
import org.apache.fop.render.pdf.CTMHelper;
import org.apache.fop.util.CharUtilities;

/**
 * The codeJava2DRenderer/code class provides the abstract technical
 * foundation for all rendering with the Java2D API. Renderers like
 * codeAWTRenderer/code subclass it and provide the concrete output 
paths.

 * p
 * A lot of the logic is performed by codeAbstractRenderer/code. The
 * class-variables codecurrentIPPosition/code and
 * codecurrentBPPosition/code hold the position of the currently 
rendered

 * area.
 * p
 * codeJava2DGraphicsState state/code holds the 
codeGraphics2D/code,
 * which is used along the whole rendering. codestate/code also 
acts as a

 * stack (codestate.push()/code and codestate.pop()/code).
 * p
 * The rendering process is basically always the same:
 * p
 * codevoid renderX(Area area) {
 *//calculate the currentPosition
 *state.updateFont(name, size, null);
 *state.updateColor(ct, false, null);
 *state.getGraph.draw(new Shape(args));
 * }/code
 *
 */
public abstract class Java2DRenderer extends 
AbstractPathOrientedRenderer implements Printable {


/** The scale factor for the image size, values: ]0 ; 1] */
protected double scaleFactor = 1;

/** The page width in pixels */
protected int pageWidth = 0;

/** The page height in pixels */
protected int pageHeight = 0;

/** List of Viewports */
protected List pageViewportList = new java.util.ArrayList();

/** The 0-based current page number */
private int currentPageNumber = 0;

/** The 0-based total number of rendered pages */
private int 

Re: JAXP and docbook-xsl Stylesheets

2006-09-13 Thread Simon Pepping
On Wed, Sep 13, 2006 at 11:06:36AM -0500, Don Adams wrote:
 
 I am trying to use the JAXP Transformer in my Java code
 to translate valid docbook article XML 
 into valid XHTML and FO XML. I am having a major problem with
 the use of the non-breaking space code #160; in
 the docbook-xsl stylesheets. The cause of the problem 
 is perfectly described under 5. Be careful with 
 nonbreaking spaces on this web page:
 
 http://www.oreillynet.com/pub/a/oreilly/java/news/javaxslt_0801.html
 
 To summarize, special characters in the docbook-xsl
 stylesheets are transformed into the actual special characters
 in the output of the transformation when the transformation
 method is selected as xml.  So, for example, when
 a transformation is done into FO XML, a table title in the
 FO XML output contains Table 1. x; however, the spaces
 after the word Table and after 1. are not the ASCII space 
 character, they are a single character code 160
 (a non-breaking space) which is not valid in an XML file.

This sounds like an encoding problem. When your xml file has latin1
encoding (iso-8859-1), non-breaking space is a single character of
value A0. When your xml file has utf-8 encoding, non-breaking space
consist of two bytes. If you mix both, that is, when the xml file
declares utf-8 encoding but non-breaking space is written in the
latin-1 manner as a single byte A0, your XML file is not valid.

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

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



Keeping tables together with FOP 0.92b

2006-09-13 Thread cknell
I' recently back to working with FOP. I have a document that consists of a 
number of tables with widely-varying numbers of rows. Sometimes several tables 
will fit entirely onto a single page, with others will span several pages. The 
problem I'm having involves those cases where a table almost fits onto a page, 
but one or two rows flow over onto the next page. I'd like to start a new page 
if the table won't fit onto the current one.

I've tried some keep-with-previous tacks, but when a very long table won't fit 
onto a single page FOP errors out.

Does anyone have a sure-fire method for causing a table to start on a new page 
if all the rows won't fit on the current page?

Thanks.

-- 
Charles Knell
[EMAIL PROTECTED] - email

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



Re: [docbook-apps] JAXP and docbook-xsl Stylesheets

2006-09-13 Thread Jirka Kosek

Don Adams wrote:


into valid XHTML and FO XML. I am having a major problem with
the use of the non-breaking space code #160; in
the docbook-xsl stylesheets. The cause of the problem 
is perfectly described under 5. Be careful with 
nonbreaking spaces on this web page:


http://www.oreillynet.com/pub/a/oreilly/java/news/javaxslt_0801.html


This is not perfect description, but complete mess. If you have problems 
displaying files containing Unicode character with code 160 (U+00A0), 
then your browser is unable to infer encoding used correctly. This can 
be due misconfigured HTTP server, but there could be other things that 
went wrong.



To summarize, special characters in the docbook-xsl
stylesheets are transformed into the actual special characters
in the output of the transformation when the transformation
method is selected as xml.  So, for example, when
a transformation is done into FO XML, a table title in the
FO XML output contains Table 1. x; however, the spaces
after the word Table and after 1. are not the ASCII space 
character, they are a single character code 160

(a non-breaking space) which is not valid in an XML file.


This character is perfectly valid in XML file. XML file can contain any 
Unicode character in element and attribute content.



From everything I've read, it seems like this is the
correct behavior 


Seems that you have read wrong resources.


Does anyone have any comments or suggestions?


You didn't show us your code which is dealing with JAXP. Could it be 
that you are using your own stream for writing output of transformation 
and you are setting incorrect encoding on this stream?


Jirka

--
--
  Jirka Kosek e-mail: [EMAIL PROTECTED] http://www.kosek.cz
--
  Profesionální školení a poradenství v oblasti technologií XML.
 Podívejte se na náš nově spuštěný web http://DocBook.cz
   Podrobný přehled školení http://xmlguru.cz/skoleni/
--
   Nejbližší termíny školení:
** XSLT 23.-26.10.2006 ** XML schémata 13.-15.11.2006 **
 ** DocBook 11.-13.12.2006 ** XSL-FO 11.-12.12.2006 **
--
  http://xmlguru.czBlog mostly about XML for English readers
--



smime.p7s
Description: S/MIME Cryptographic Signature


Re: JAXP and docbook-xsl Stylesheets

2006-09-13 Thread Don Adams

Simon,

A HUGE thank you!  Yes, after spending hours
trying to figure this out, all I needed to
do was change this:

transformer.setOutputProperty(OutputKeys.ENCODING,UTF-8);

to this:

transformer.setOutputProperty(OutputKeys.ENCODING,ISO-8859-1);

--
Don


 This sounds like an encoding problem. When your xml 
 file has latin1 encoding (iso-8859-1), non-breaking 
 space is a single character of value A0. When your xml 
 file has utf-8 encoding, non-breaking space consist of 
 two bytes. If you mix both, that is, when the xml file
 declares utf-8 encoding but non-breaking space is written 
 in the latin-1 manner as a single byte A0, your XML file 
 is not valid.



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



Performance Suggestions

2006-09-13 Thread Jonathan B. York
Hi,

I'm using FOP 0.92beta with Sun's J2RE 1.4.2_12, running on Red Hat
Enterprise Linux 4.  I'm processing FO documents that are about 4-7 MB 
in size and it takes about 60 - 80 seconds to parse into PDF.

This is how I'm calling FOP:

export FOP_OPTS=-Xmx128m; export JAVA_HOME=/usr/local/j2re1.4.2_12;
/usr/local/fop-0.92beta/fop doc.fo -pdf doc.pdf  errors

The machine is dual Xeon 2.66GHz with 2GB RAM.


Does anyone have any suggestions for ways I could improve performance?
I'm not really familiar with Java-based applications.


Thanks in advance!

-- 
Jonathan B. York
Software Developer
http://www.entersol.com/

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



Re: Make Landscape default orientation

2006-09-13 Thread J.Pietschmann

pavithra atrangada wrote:

How to make orientation default to Landscape using FOP while printing


Just swap height and width for the page master, for example

  fo:simple-page-master page-height=29.7cm page-width=21cm ...

for A4 landscape (don't forget swapping margins and extents,
references for static content, and maybe resetting
reference-orientations).

J.Pietschmann

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



Re: How to get the text be flowed to the next column

2006-09-13 Thread Susanta Dash
Hey guys,

Are we on the same page yet? OR Am I making any mistake to understand how to layout this problem OR this feature ismissing entirely or in the build I'm using(0.20.5)?

Thanks.
On 9/13/06, Susanta Dash [EMAIL PROTECTED] wrote:
Glen,Actually i've a paragraph(s) of text, ABC was just an example. Like in myprevious example i had 2 paragraphs and to be fit in 2 different rows each.
It's not at all a problem if i have same number of columns in each row, butvariable column count is an issue.Thanks.-Original Message-From: Glen Mazza [mailto:
[EMAIL PROTECTED]]Sent: Wednesday, September 13, 2006 12:03 AMTo: fop-users@xmlgraphics.apache.orgSubject: Re: How to get the text be flowed to the next column
Susanta Dash wrote: Here is the problem I'm facing while rendering it in FOP. I've two rows, first one has 3 columns and the next has 2 columns. The text within these rows need to be flowed to the next column.
Why wouldn't having one column for each row and letting the text flownormally solve what you need?What would be lost if you did that? Like for example: I've ABC as text, in this scenario I want the text to be
 arranged as A in column1, B in column2 and C in column3. The same thing for the second row.Are there spaces between ABC?I'm having difficulty generalizing whatyou want.What if you had The person is in the room as text--which
words would you want in each column?Also, what justification would youwant for the text in each column?Glen I tried to arrange the text below, hope it's viewable: 
 | A | B | C |  |X |Y|  I also tried to set column-count in fo:region-body at page level, where i can set either to 2 or 3, which is not helpful.
 Suggestions are highly appreciated. Thanks. Susant.-To unsubscribe, e-mail: 
[EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to get the text be flowed to the next column

2006-09-13 Thread Glen Mazza
Susanta,  I think you're a victim of your earlier thread-hijacking, 
check this post:

http://marc.theaimsgroup.com/?l=fop-userm=115812992904817w=2

Basically, I believe the reason why you are using tables is because XSL 
1.0 does not provided the advanced layout functionality you want with 
respect to regions and page flow (because it just has 
fo:simple-page-master), so you are hoping to accomplish with tables what 
you can't do with pages/regions.  Problem is, if the XSL Working group 
would have defined this layout for tables (which would be an odd use 
case here), they would probably have first done it for pages/regions anyway.


The fo:flow-map/multiple fo:flow of XSL 1.1 (not yet implemented in FOP) 
might help you, as the link above states; in addition, I think the XSL 
WG will eventually create an fo:page-master that will also have the 
advanced layout missing from fo:simple-page-master.


Glen


Susanta Dash wrote:


Hey guys,
 
Are we on the same page yet? OR Am I making any mistake to understand 
how to layout this problem OR this feature is missing entirely or in 
the build I'm using(0.20.5)?
 
Thanks.
On 9/13/06, *Susanta Dash* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Glen,

Actually i've a paragraph(s) of text, ABC was just an example.
Like in my
previous example i had 2 paragraphs and to be fit in 2 different
rows each.
It's not at all a problem if i have same number of columns in each
row, but
variable column count is an issue.

Thanks.

-Original Message-
From: Glen Mazza [mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 13, 2006 12:03 AM
To: fop-users@xmlgraphics.apache.org
mailto:fop-users@xmlgraphics.apache.org
Subject: Re: How to get the text be flowed to the next column


Susanta Dash wrote:


 Here is the problem I'm facing while rendering it in FOP.
 I've two rows, first one has 3 columns and the next has 2
columns. The
 text within these rows need to be flowed to the next column.

Why wouldn't having one column for each row and letting the text flow
normally solve what you need?  What would be lost if you did that?

 Like for
 example: I've ABC as text, in this scenario I want the text to be
 arranged as A in column1, B in column2 and C in column3. The
same thing
 for the second row.

Are there spaces between ABC?  I'm having difficulty
generalizing what
you want.  What if you had The person is in the room as text--which
words would you want in each column?  Also, what justification
would you
want for the text in each column?

Glen


 I tried to arrange the text below, hope it's viewable:

 
 | A | B | C |
 
 |  X   |  Y  |
 

 I also tried to set column-count in fo:region-body at page level,
 where i can set either to 2 or 3, which is not helpful.

 Suggestions are highly appreciated.

 Thanks.

 Susant.


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





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



Re: Wrapping long character strings

2006-09-13 Thread Wyatt Tellis
Do you know if there are plans to update the XSL-FO standard to give 
better control over wrapping? It seems that something like this really 
shouldn't fall under the category of hyphenation.


-Wyatt


Jeremias Maerki wrote:

overflow won't help here. wrap-option only controls whether to wrap or
not, not how to wrap. XSL-FO uses country, language and script to
indirectly specify how line-breaking should be done. script is not
supported and country/language are currently only used to select the
right hyphenation pattern file. It's currently not possible to better
control how line breaking is done.

The only possible thing is to try to write a hyphenation pattern file
which will allow you to better specify additional word-breaking points.
I've never done that myself, but there should be some documentation on
the web (the patterns are originally from TeX) and I think some ideas
have been thrown around on this mailing list before. So searching the
archives might help. At any rate, there's no easy way.

On 10.09.2006 16:56:46 Wyatt Tellis wrote:
The asterisks are only one example. What about other character strings? 
Unfortunately I have no control over what data is put in the report, but 
I have to make sure that all characters are presented to the reader. I 
can implement the (#x200B;) workaround, but would prefer a FO only 
solution. Is there some value of either the overflow or wrap-option 
attributes that might help with this situation? I'm trying to emulate 
the behavior of apps such as MS Word or Notepad that do the line 
wrapping automatically (I really don't want hyphenation because these 
are not true English words).


-Wyatt

Jeremias Maerki wrote:

I'd have to look up whether according to UAX#14/TR14 we would be allowed
to break between two * characters in the first place. Not that FOP
already implements the full rule set, yet! At any rate, I'd try to
insert a zero-width space (#x200B;) after each * character to allow
for breaks in between. Maybe that helps.

On 09.09.2006 04:43:02 Wyatt Tellis wrote:
I'm building a medical report printing application and I'm having 
trouble forcing long characters strings (not really words) to wrap. FOP 
gives the error: Line 1 of a paragraph overflows the available area. 
(fo:block...  For example I may have a series of 80 '*' characters. I 
would like to have that string wrap to 2 lines instead of  continuing 
over the edge of the page.  Per the wiki 
(http://wiki.apache.org/xmlgraphics-fop/Troubleshooting/CommonLogMessages), 
I've tried using the wrap-option and overflow attributes to get the 
strings to wrap with no luck. Hyphenation doesn't work either. I'm using 
0.92.beta. Is there a way to get this to work in FOP?



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]



RE: How to get the text be flowed to the next column

2006-09-13 Thread Susanta Dash

I appreciate your honest replies.

This is for Pascal:
 As a workaround, you can try to play with fo:block-container in absolute
 position, but you have to cut the flow-text yourself.
When you say cut the flow-text yourself, do you mean that I've to figure
out the column breaks and explicitly move the text to the next column(s)? If
yes, this is what I'm trying now, which is not impossible, but is close to
that as my text has formatting objects embedded in it like say part of the
text is BOLD/ITALIC or have different font size.

Glenn, You're right. I had to think about tables now, earlier I had only
same number of columns in each row within a page which works fine with the
column-count property on page level.

Hey guys, I can't wait for XSL-FO 1.1 and can't see any alternative. Can you
guys just guide me to accomplish my need; I'm trying to get the exact point
where to break the text, so that I can just move the rest of the text to the
next column. I'm thinking to use AWT renderer and pick the font metrics by
using Rectangle2D and JPEGEncoder, etc. etc. Now, what I'm afraid of is, the
co-ordinates I'll generate from this, will it be the same or will be fit for
FOP or Can I use some FOP thing that helps me doing this?

Thanks.

-Original Message-
From: Glen Mazza [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 13, 2006 7:03 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: How to get the text be flowed to the next column


Susanta,  I think you're a victim of your earlier thread-hijacking,
check this post:
http://marc.theaimsgroup.com/?l=fop-userm=115812992904817w=2

Basically, I believe the reason why you are using tables is because XSL
1.0 does not provided the advanced layout functionality you want with
respect to regions and page flow (because it just has
fo:simple-page-master), so you are hoping to accomplish with tables what
you can't do with pages/regions.  Problem is, if the XSL Working group
would have defined this layout for tables (which would be an odd use
case here), they would probably have first done it for pages/regions anyway.

The fo:flow-map/multiple fo:flow of XSL 1.1 (not yet implemented in FOP)
might help you, as the link above states; in addition, I think the XSL
WG will eventually create an fo:page-master that will also have the
advanced layout missing from fo:simple-page-master.

Glen


Susanta Dash wrote:

 Hey guys,

 Are we on the same page yet? OR Am I making any mistake to understand
 how to layout this problem OR this feature is missing entirely or in
 the build I'm using(0.20.5)?

 Thanks.
 On 9/13/06, *Susanta Dash* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 Glen,

 Actually i've a paragraph(s) of text, ABC was just an example.
 Like in my
 previous example i had 2 paragraphs and to be fit in 2 different
 rows each.
 It's not at all a problem if i have same number of columns in each
 row, but
 variable column count is an issue.

 Thanks.

 -Original Message-
 From: Glen Mazza [mailto: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, September 13, 2006 12:03 AM
 To: fop-users@xmlgraphics.apache.org
 mailto:fop-users@xmlgraphics.apache.org
 Subject: Re: How to get the text be flowed to the next column


 Susanta Dash wrote:

 
  Here is the problem I'm facing while rendering it in FOP.
  I've two rows, first one has 3 columns and the next has 2
 columns. The
  text within these rows need to be flowed to the next column.

 Why wouldn't having one column for each row and letting the text flow
 normally solve what you need?  What would be lost if you did that?

  Like for
  example: I've ABC as text, in this scenario I want the text to be
  arranged as A in column1, B in column2 and C in column3. The
 same thing
  for the second row.

 Are there spaces between ABC?  I'm having difficulty
 generalizing what
 you want.  What if you had The person is in the room as text--which
 words would you want in each column?  Also, what justification
 would you
 want for the text in each column?

 Glen


  I tried to arrange the text below, hope it's viewable:
 
  
  | A | B | C |
  
  |  X   |  Y  |
  
 
  I also tried to set column-count in fo:region-body at page level,
  where i can set either to 2 or 3, which is not helpful.
 
  Suggestions are highly appreciated.
 
  Thanks.
 
  Susant.
 

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




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