Re: table-cell wrapping

2002-06-26 Thread J.Pietschmann

Matthew L. Avizinis wrote:
 fo:table-cell
 fo:block space-before={$spc-b4} text-indent={$indent}
 space-after={$spc-after} margin-right=0mm
 /fo:table-cell
 wrap option is default unless otherwise set to 'nowrap', unless my
 understanding is incorrect and nowrap _is_ the default, which sounds
 counter-intuitive.

Default is to wrap.

Is there a margin inherited from an enclosing block?
I've bitten several times by this. In this case, put
margin=0mm right on the fo:table element.

J.Pietschmann


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




Re: documentation for the maintenance branch

2002-06-26 Thread J.Pietschmann

Jeremias Maerki wrote:
 We're not really in a hurry, are we?
I thought we are...
The problem is that DTD and XSL of all documents has to be
in sync, a partial commit breaks things :(

 If it makes life simpler: +1. The only question arises when we're coming
 to the point when we're starting with dev releases of the redesign.
 We need different docs for each, right?

We should factor out a common set.

 I still don't get Jörg's CVS notifications. What can we do to get them
 working? I'd really appreciate to know what's going on in CVS.

The last checkin showed a generate commit notification mail
or something, but I didn't get one either.

J.Pietschmann


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




Re: Loading FOP userconfig file from EAR

2002-06-24 Thread J.Pietschmann

Toulson, Simon wrote:
 We have our own userconfig.xml file which specifies the fonts used by Fop.
  Unfortunately the loading of this file always fails.

That's easy to see, the userconfig has to be a real file.

You can essentially try to copy what is in
  Options.loadUserconfiguration(File userConfigFile),
substitute
  new InputSource(your classloader.getRessourceAsStream(...))
or something for
  InputHandler.getFileInputSource(...)

 This message is for the named person's use .
Oh no!

HTH
J.Pietschmann



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




Re: FOP in the forrest

2002-06-21 Thread J.Pietschmann

Christian Geisert wrote:
 Keiron Liddle schrieb:
 Any questions, comments?

I'm already adapting the docs to the forrest 1.1 DTDs

 There are some issues with the (old) documentation for the maintenance 
 branch which I will bring up in an extra mail.

Are they different from HEAD?

J.Pietschmann


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




Re: PDF in a JSP ... searching alternative way

2002-06-20 Thread J.Pietschmann

Massimiliano Cuccia wrote:
 I want to produce a pdf in a jsp, so I have a string fo that contains the fo
 instructions ...
 I had found this code to output the pdf directily in the browser
   Driver driver = new Driver(new InputSource(new
 StringBufferInputStream(fo)), response.getOutputStream());
 
 and it's OK, there is another way to do that task?
 I don't want to pass the response.getOutputStream() actual parameter ...
 any ideas??

You should not use FOP from an JSP in order to generate
PDF. PDF may be binary, which could confuse the output
(which assumes the output is *character* data).
Use a servlet, and generate the FO with XSLT, as advised,
or check out Cocoon.

J.Pietschmann



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




Re: DO NOT REPLY [Bug 10031] - FOP error handling: return codesnot set

2002-06-20 Thread J.Pietschmann

Has anybody received the CVS message from Jörg's change. I didn't. Maybe
it's still somewhere in a moderator queue? That was the case when I
committed my first change to CVS after receiving committer muscles.

I'm not subscribed to the fop-cvs list. Perhaps
I should do so...

J.Pietschmann


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




test cases

2002-06-20 Thread J.Pietschmann

Hi all,
I've accumulated quit a few testcases from the bugzilla
bug reports.
Some are working now, some still produce errors.
We don't have an explicit test data directory yet.
Should I create one?

J.Pietschmann


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




Re: how to deal with tabulations

2002-06-20 Thread J.Pietschmann

Sylvain MOUGENOT wrote:
 HI.
 I've a structured document where the user can modify some of the
 presentation such as alignment, indentation and tabulation.
...
 QUESTION
 Is it possible to do?

Not easily with FO builtins. You'll have to use a table,
and you'll have to calculate the table column the text
will go into, and probably column spans for the cells.
It's doable but very messy in XSLT, especially if
proportional fonts are used and even more if (gasp) fonts
are mixed. Your XML is optimized for data entry, not for
processing. That's your problem.
I've seen similar stuff before, and in each case the
problems were caused sloppy analysis of what the users
really needed. Check whether the presentation modifications
are really all necessary in the form declared, and whether
a GUI tool can be used for data entry which produces XML
more amenable to further processing.

J.Pietschmann


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




Re: [ANNOUNCEMENT] FOP 0.20.4 Release Candidate available

2002-06-18 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:
 Is it me, or do the examples in fop-0.20.4rc/docs/examples/svg not work.
 
 ../../../fop.sh external.fo external.pdf
 [INFO] FOP 0.20.4rc
 [INFO] building formatting object tree
 [Fatal Error] external.fo:79:81: The prefix xlink for attribute xlink:href is 
not bound.
 [ERROR] The prefix xlink for attribute xlink:href is not bound.

The namespace declaration is indeed missing. I'm currently
reworking some parts of the examples, I'll fix this too. This
will take one or two more days though.

J.Pietschmann



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




Re: Problem with multi-paged TIFFs

2002-06-18 Thread J.Pietschmann

Padmanabhan, Shobana wrote:
 I tried with JAIImage for TIFF in FopImageFactory and the problem persists.
 Is there work going on to support multi-paged TIFF images?

Not that I'm aware of. How do you think should multi-page
TIFFs be rendered? The spec only provides for one rectangular
area to be filled...

J.Pietschmann



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




Re: FopServlet

2002-06-16 Thread J.Pietschmann

Nirupama Yalavarti wrote:
 I could do that..THE file is being saved in
 jtomcat/bin
 Is there any way to change that location? may be to
 jtomcat/webapps/deployment directory ?

Thousands of possibilities.
Hardcode
  FileOutputStream fos=new FileOutputStream(../webapps/whatever/test12.pdf);
or investigate what you can do with
HttpServletRequest.getPathTranslated()

Now this is gettin way off of topic...

J.Pietschmann


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




Re: SVG base URL exception

2002-06-16 Thread J.Pietschmann

David Neumann wrote:
 FOP is complaining about Could not set base URL for svg and refusing 
 to draw a line. How does one set this URL?  The version of FOP I'm using 
 .20.1
 
 Specifically, this XSL:FO...
 
 fo:block
fo:instream-foreign-object
   svg xmlns=http://www.w3.org/2000/svg; width=6in height=0.1in
   gline stroke-width=0.05in stroke=#00 x1=0.4in 
 y1=1.2in y2=1.2in x2=6in/line/g
   /svg
/fo:instream-foreign-object
 /fo:block
 
 
 ...gives me this stack trace...
 
 [ERROR]: Logger not set
 [INFO]: building formatting object tree
 [INFO]: [1]
 [INFO]: [2]
 [ERROR]: 
 [ERROR]: 
 [ERROR]: Could not set base URL for svg
 java.net.MalformedURLException: java.lang.NullPointerException

Odd, I was not able to find the error location in the 0.20.1
source. Are you sure you are using 0.20.1? Anyway, it is
recommended to upgrade to 0.20.3 or .4 (soon to appear), because
this fixes a few important bugs.
Apart from this, you could try to set the baseDir property
   http://marc.theaimsgroup.com/?l=fop-devm=101777546120252w=2

J.Pietschmann


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




Re: FopServlet

2002-06-15 Thread J.Pietschmann

Nirupama Yalavarti wrote:
 But I have programmed that the pdf is saved to
 specific file(that is the way I want it) ie teh pdf
 generated be saved as a specific file in the server.
 But that doesnt seem to happen.I was expecting it to
 be saved in tomcat/bin.
 Any idea of setting something else for that?
 Thanks
 Nirupama
 
 This what I have written:
 
 ByteArrayOutputStream xslOut = new
 ByteArrayOutputStream();
 byte[] pdfOutData = doRenderPDF(xslOut);
  

 response.setContentType(application/pdf);
 
 response.setContentType(application/pdf;
 name=\test12.pdf\);
 response.setHeader(Content-Disposition,
 inline;filename=\test12.pdf\);

You should only set *one* of the above.

 response.setContentLength(pdfOutData.length);
 
 OutputStream resOut = response.getOutputStream();
 resOut.write(pdfOutData);
 resOut.close();

Apart from this, you are writing your PDF to the servlet's
output stream and therefore to the browser. The
content-disposition setting is a hint for the *browser* on
how to save the content if it chooses to.
If you want to write to a file on the server, use something
like
  FileOutputStream fos=new FileOutputStream(test12.pdf);
  fos.write(pdfOutData);
  fos.close();

J.Pietschmann


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




Re: JimiException with TIFF

2002-06-15 Thread J.Pietschmann

Padmanabhan, Shobana wrote:
 I get an error when I try to include a TIFF in the sample images.fo. If I
 replace this with a GIF, it works fine. Any pointers would be appreciated.

The most likely cause is that Jimi doesn't understand
the TIFF subformat, perhaps an unusual or patent protected
compression.

J.Pietschmann



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




Re: SVG/SVG inclusion issue ?

2002-06-13 Thread J.Pietschmann

Dominique Broeglin wrote:
 When I add the doctype, it works. But I was not
 aware the doctype was mandatory, is it ?

Does this mean it worked after zou added the SVG DTD declaration?

   What confuses me is the fact that batik reads b.svg correctly but FOP
 doesn't. But FOP delegates SVG handling to batik... Could you explain me
 if it's normal behaviour ?

Going into guess mode...
There are always issues with embedding other stuff. You don't
embed it wholesale. Command line applications often contain
additional logic for reading configurations and setting up
various stuff.
I suppose the XML parser used for parsing the SVG pointed
to by a fo:external-graphics is set up by FOP. If the SVG
includes antoher SVG, a new parser is set up, this time by
Batik. It is just possible that FOP's parser is correctly set
to non-validating, while the parser used by Batik uses Xerces
default, which is validating (I think. You use Xerces?). If so,
it falls over if there is no doctype declaration. Running a
Batik command line application might use a properly configured
parser factor.
There might be other issues, SVG had set some nasty precedents
by defining one or antoher important attribute default value
in the DTD (in particular the SVG namespace declaration), though
it is hard to see how a staand-alone Batik circumvents this.

J.Pietschmann


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




Re: FopServlet

2002-06-13 Thread J.Pietschmann

Nirupama Yalavarti wrote:
 Hi all...
 I am damn new to Tomcat  and Fop.Ive been trying to
 sue Fop thru a servlet and was using the example
 FopServlet of the examples/embedding. That minimal
 thing itself doesnt seemt ot work and it geives me
 errors..
 Can anyone help me out...
 It gives me the following errors...
...
 java.lang.ClassNotFoundException:
 javax.xml.transform.Transformer

The servlet's class loader can't find Xalan.

Are you using Tomcat 4.0.3? In this case, either copy
the Xalan jar, fop.jar and batik.jar from the webapp's
lib directory into Tomcat's lib directory, or upgrade
to Tomcat 4.0.4b3.
I think i've seen more detailed instructions in some
Tomcat documentation.

Otherwise, check yout webapp's lib directory whether it
contains all the jars from the FOP duirstribution's lib
directory.

J.Pietschmann


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




Re: FopServlet

2002-06-13 Thread J.Pietschmann

Nirupama Yalavarti wrote:
 Thats a great anwere...THE servlet seems to ahve run
 correctly( In fact it didnt show me any error..)
 But where can I find the produced pdf? any idea?

In your browser? Look into the browser cache first.
IEx is a bit fragile when it comes to showing PDF.
Configure your webapp so that you can use an URL
ending in .pdf for retrieving the PDF:
  http://my.host/some/path/to/servlet.pdf
or
   http://my.host/some/path/to/servlet.pdf?xml=foo.xmlxsl=foo.xsldummy=.pdf

More importantly, set the content type correctly
to application/pdf, and buffer the PDF output in
a ByteArrayOutputStream so that you can send the
exact length to the browser (IEx will show a
blank window if you fail to do this).

J.Pietschmann


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




Re: SVG/SVG inclusion issue ?

2002-06-11 Thread J.Pietschmann

Dominique Broeglin wrote:
   I'm not sure this is a bug, so this is half a bug report half a request
 for help. I use fop 20.3rc
   I've a fle a.svg:
 svg width=100 height=50
   g id=test
 ...
   /g
 /svg
 
   A second file b.svg:
 
 svg xmlns:xlink=http://www.w3.org/1999/xlink; 
  width=500 height=500
   image xlink:href=file:retro.svg x=80 y=130 width=100
 height=50/
 /svg
 
 When I vizualize the file with batik (or batik rasterizer) I obtain b
 including a. So far so good. Unfortunately then I try to include b.svg
 in c.fo with: fo:external-graphic src=file:b.svg/. 
 
 The resulting PDF contains the schema in b.svg, but a the place of a.svg
 in b.svg I've an icon representing a broken image. Is this normal
 behaviour ?

No. Batik, the SVG rasterizer, either cannot find the referenced file or
it cannot decode its format.
Point 1: file:b.svg is, technically, an invalid URL. FOP tries to cope
with it, but Batik has it's of logic. Use b.svg or a full path
file:///path/to/b.svg. In the first case, all three files a.svg, b.svg
and c.fo should be in the current directory.
Point 2: Neither of the code snippets you show has the SVG namespace
declared as default namespace. The usual way is that this is done in
the SVG DTD. Check whether both files either include a proper DOCTYPE
declaration pointing to the DTD, or declare the SVG namespace.
Point 3: Your b.svg links retro.svg, not a.svg.

J.Pietschmann


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




Re: margin-top of a block in a table-cell

2002-06-10 Thread J.Pietschmann

Juergen Lippold wrote:
 I have got a table with labels. For the labels I want to put in a text
  with a margin to the top and to the left.
 The margin-left value is working all right but the margin-top doesn't
  do anything. Is this a real bug or is it my fault?

Use space-before.

 With the padding-top attribute I can reach that there is a margin to
  the top. Whats the difference between the padding and the margin
  attribute?
Padding doesn't work. Margins work...marginally.

  Whats the definition when to use what attribute?

Trial and error, I'd say. Read the source. FOP has still a lot
of deficiencies.

J.Pietschmann


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




Re: SAX, fopservlet and 0.20.2

2002-06-06 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:
 I am now testing using the glossary xml/xsl files in the example directory,
 but with the same results.  It works fine from the command line, but NPE
 whenever I introduce the SAXResult or SAXSource.  I'm starting to think it
 might be something with me environment.  Also, if I stream it to a file
 using StreamResult, I can then take the resultant fo and use the Fop
 command line utility on that and it is fine.

It is possible that it is a problem involving undeclared namespaces.
GGet a recent Xalan or get Saxon (http://saxon.sourceforge.net) at run
your stylesheet:
   xalan -in foo.xml -xsl foo.xsl -out foo.fo
The Xalan included in the FOP distribution sometimes throws NPEs by
itself and sometimes passes null namespaces to FOP which cause
NPEs, but the latter might be masked by serialisation and reparsing.
A more recent Xalan will provide a proper error message.

 Sorry, the xml.apache.org stated you needed the sax api, not sax.jar -
 xalan should cover this?
 
Not Xalan, Xerces (included in the FOP distribution.

J.Pietschmann


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




Re: SAX, fopservlet and 0.20.2

2002-06-05 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:
 I recently switched from a standalone FOP app to the servlet.  The code
 compiles fine, but any lines that use SAX throw a transformer exception.

Do your files work with the command line FOP?
   fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
If you get a NPE
   [ERROR]: null
add the -d switch to get a stack trace.

 Also, I don't explicitly include the sax jar file - do I need to?  I'm
 using xalan 2.0.0 and xerces 1.2.3.

What sax jar file?

You might also consider upgrading to 0.20.3.

J.Pietschmann


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




Re: Embedded FOP From fo-Document to PDF

2002-06-04 Thread J.Pietschmann

Juergen Lippold wrote:
 I'm looking for a way to convert a org.w3c.dom.Document with the FO-Format directly 
to a PDF-File.
 The following code is running if I use the x.fo-File written to the harddisk.
 Using the document from memory I get an error:
 
 [INFO]: building formatting object tree
 [ERROR]: Unknown formatting object null^null

This is most often a symptom of an empty DOM tree.
Getting nodes from somewhere into a DOM document
can be more tricky than most people think, for
example
  http://marc.theaimsgroup.com/?l=fop-devm=101685299217845w=2

You can use an identity transformer to dump your
DOM document onto disk in order to check this:


public void generatePdfFile(Document foDocument, String pdfFileName) {
  //--- dump
   TransformerFactory.newInstance().newTransformer()
 .transform(new DOMSource(foDocument),new StreamResult(dump.fo));
  //--
 Driver driver = new Driver();
 driver.setRenderer(Driver.RENDER_PDF);

 FileOutputStream fos = null;

J.Pietschmann


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




Re: printing the correct document

2002-06-04 Thread J.Pietschmann

Juergen Lippold wrote:
 The result is a document with a left margin of 0.8cm (maybe from the printer?) 
This would be unusual.

 Is there a feature to set a margin for the printer in a FO-document?
Not that I'm aware of.

There may be persistent settings for the printer driver on the machine.


 Setting the page margin-left to a higher value doesn't work, because the
  labels will be positioned the margin to the right and this will be added
  to the margin (maybe) made fom the printer.

I'd think of decreasing the left margin and increase the right margin by
the same amount.

J.Pietschmann



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




Re: Exploring the FOP API design space

2002-06-03 Thread J.Pietschmann

Some remarks:

Jeremias Maerki wrote:
 - I'm not sure if we should change the API in the maintenance branch.
   Breaking backwards-compatibility produces and deprecating old
   interfaces and classes is not so popular, usually.
Of course, that's why I thought of keeping the old interface for
quite a while, but marking it deprecated after the new interface
becomes stable.

 - Avalon scares some people.
Not necessarily. It depends how visible avalon features are and
how much knowledge of, say, JAXP is immediately useful for
newcomers to FOP.
As for the avalon jar(s), this can be dealt with by providing a
big fop-all.jar.

   It should be relatively easy to hide the Avalon
   stuff.
Ooops. That's what I meant.

 - I'd like to work more with MIME-types for specifying the output format
   instead of subclassing a class for each output format. This may help
   to reduce dependencies.
Interesting.

J.Pietschmann


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




Big FOP FAQ

2002-05-31 Thread J.Pietschmann

The faq-big has been checked in, you are invited to proof-read
it. It's not yet integrated into the build process, and many links are
dead. I intend to write a few more documents the links will point to,
some are already in progress. Furthermore I have some plans to migrate
the FOP xdocs to the v11 DTDs under development now by forrest. I'd
like to have the old short FAQ kept active until everything else is
ready.

Regards
J.Pietschmann


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




Exploring the FOP API design space

2002-05-31 Thread J.Pietschmann
 built:
- Whether to expose
  1. Avalon component interface only
  2. Both Avalon and non-avalon interface
  3. Non-Avalon interface only
- Design variant for input channel
- Design variant for output channel
- Design variant for object reuse
- Whether to provide a factory (if appropriate)
I hope this happens within the next week.
I will then post a detailed interface to the list. I hope
someone will help me to avalonise this, if necessary.
After the interface is voted on, I'll implement this,
with the objective to have running code in august. The
current interface should be deprecated but kept for a
few maintenance releases.

Is this ok?

J.Pietschmann


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




Re: external-graphic

2002-05-30 Thread J.Pietschmann

Kelvin Zheng wrote:
 Has anyone successfully displayed image at page header as the following:
 
 fo:static-content flow-name=xsl-region-before
 fo:block
 fo:external-graphic 
 src=http://xml.apache.org/fop/resources/logo.gif;
 /fo:external-graphic
 /fo:block
 /fo:static-content
 
 The image doesn't show up for me and received a warning message 
 Warning: Some static content could not fit in the area..
 
 I tried very small image. It doesn't help.

It's probably still too large. Try to scale it down, for example


   fo:external-graphic height=10mm
 src=http://xml.apache.org/fop/resources/logo.gif/

J.Pietschmann


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




Re: How to create TOC

2002-05-29 Thread J.Pietschmann

Ali, Farhan wrote:
 Anybody having any example of how to create Table of Contents(TOC)
 dynamically on the basis of xml document. while generating PDF using XML and
 XSL as input.

The usual approach is moded templates. A general outline
of the necessary techniques can be found in the XSL FAQ,
especially here:
  http://www.dpawson.co.uk/xsl/sect2/N7402.html

Apart from the actual layout of a TOC in XSLFO, which can be
tricky, this is an XSLT question. Further clarifications
should be sought on the XSL list.
  http://www.mulberrytech.com/xsl/xsl-list/

J.Pietschmann


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




Re: build changes

2002-05-25 Thread J.Pietschmann

Peter B. West wrote:
 I'm beginning to realise what a mighty cultural gulf I'm talking across. 

Every developer seems to dream of solving the versioning
problem. Unfortunately, there are no universally accepted,
detailed specs on what's a version and even on what problems
versioning should solve. The CORBA people promised a system
for solving interop problems in 3.0, and committed quite
significant ressoures, but nothing usable emerged from the
effort. This should indicate something.

There is also the rule If it ain't broke, don't fix it.
While it would be nice to have some guidelines written down
about naming releases and CVS branches, I wouldn't call
version handling broken in FOP. This doesn't mean it
can't be improved, I only say there is not much pressure
to improve it.

If you really like a challenge, talk the other apache
projects into using a standardised top-level directory
structure with one doc, one src and so on :-)

J.Pietschmann


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




Re: Japanese char support by FOP or not...

2002-05-22 Thread J.Pietschmann

Anil Kumar Mishra wrote:
   I tried to add a Japanese font in the userconfig.xml as per the
 details approach written ith following side. 
 http://www.zvon.org/HowTo/Output/cid-fonts.pdf
 
   But when I am trying to compile a fo file it's giving the following
 error.
 
 D:\FOP\Fop-0.20.3rcC:\jdk1.3\bin\java  -cp
 build\fop.jar;lib\logkit-1.0b4.jar;.
 ;lib\batik.jar;lib\xalan-1.2.2.jar;lib\xalan-2.0.0.jar;lib\xerces-1.2.3.jar;
 lib\
 ant.jar;lib\avalon-framework-4.0.jar;lib\jimi-1.0.jar;lib\buildtools.jar;lib
 \bsf
 .jar;lib\xalanj1compat.jar;lib\stylebook.jar;org\apache\log\format\*  -jar
 lib\l
 ogkit-1.0b4.jar;build\fop.jar org.apache.fop.apps.Fop  -c
 conf\userconfig.xml -f
 o cool5.fo -pdf cool5.pdf

Your method of invoking Java is odd. Simply use the fop.bat
command, as explained in docs/html-docs/running.html

 Exception in thread main java.util.zip.ZipException: The system cannot
 find th
 e path specified
 at java.util.zip.ZipFile.open(Native Method)
 at java.util.zip.ZipFile.init(ZipFile.java:110)
 at java.util.jar.JarFile.init(JarFile.java:115)
 at java.util.jar.JarFile.init(JarFile.java:57)
 
This is probably due to the odd (and probably incompatible)
command line.

J.Pietschmann


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




Re: Why do links generate multiple rectangles in PDF?

2002-05-22 Thread J.Pietschmann

Arved Sandstrom wrote:
 So that's your answer. :-) The multiple linked areas are an ancient
 debugging artifact, that seems to have become the norm.

The annoying part is that the link area excludes
the whitespace between the words. Or is this
intentional?
Line breaks and in particular hyphenation in a
link aren't handled properly either.

J.Pietschmann



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




Re: column width in percent

2002-05-21 Thread J.Pietschmann

Juergen Lippold wrote:
 in my xml-document I'm using a value for the column-width in a table.
 But this is a fixed value. Is it possible to work with values in percent of the 
table-width?

Not implemented yet.

 There is one solution with the right direction to use a proportional-column-width,
  but this doesn't work with JFOR to create RTF-Files. Does someone knows an other 
 solution?

No. Bad luck.
You can try to code some advanced magic into you XSLT so that you
can use a parameter to switch between percents and
proportional-column-width.

Something like
  xsl:variable name=total select=column/@width/
  xsl:for-each select=column
xsl:choose
  xsl:when test=$jfor
fo:table-column column-width={@width}%/
  /xsl:when
  xsl:otherwise
fo:table-column column-width=proportional-column-width({@width/$total})/
  /xsl:otherwise
 xsl:choose
   /xsl:for-each

Or you can create a FO for JFOR and use a the usual identity
transformation with small changes to build a FO with p-c-w()
for FOP PDF from it.


J.Pietschmann


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




Re: Japanese char support by FOP or not...

2002-05-20 Thread J.Pietschmann

Anil Kumar Mishra wrote:
 Hi,
   I want to know that whether FOP support Japanese character. I tried
 to insert some Japanese character in fo file, but couldn't get the proper
 data(Japanese chars.) in output pdf file. Can anyone suggest me anything
 about this.

FOP is able to process japanese characters. This doesn't mean
you see glyphs for japanese characters in the PDF. In order
to get this, you have to supply a font with appropriate glyphs
to FOP.
First, locate a font. If you have other applications on your
platform which display japanese, look where the system stores
fonts.
Secont, you have to prepare a font metrics file and tell FOP
to use it. This is described in the documentation in the FOP
distribution: docs/html-docs/fonts.html. You are told to assign
your font a name there.
Third, construct a small FO file to test it. Declare some
standard page master, and insert a block with japanese characters
in the flow. Select the font you installed in step 2 using
the font-family property (e.g. if you named it foo, declare
font-family=foo on the block.
Depending on your editor, you can insert the japanese characters
directly into the FO file, or use XML character references.

J.Pietschmann



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




Re: Identity crisis on cvs.apache.org?

2002-05-19 Thread J.Pietschmann

Peter B. West wrote:
 The authenticity of host 'cvs.apache.org (63.251.56.143)' can't be 
 established.
 RSA key fingerprint is 51:85:7d:8f:57:54:e7:6f:27:26:98:7a:c7:c1:47:87.
 
 However, if I keyscan cvs.apache.org, I get the same key back as is in 
 my ~/.ssh/known_hosts2 file.
 
 Has anyone else seen this, or is it another artefact of my upgrade?

I don't see anything unusual (Win2K, cygwin OpenSSH). It could
be that your ssh client has changed default settings. My ssh uses
known_hosts for storing identities, perhaps known_hosts2 indicates
SSH2 protocol or whatever. You could try to force your client to
try SSH2 or SSH1 first, or copy known_hosts2 to known_hosts, or
simply kill the file.

J.Pietschmann



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




Re: Compile error with FOP

2002-05-16 Thread J.Pietschmann

GALLO Jean-Claude wrote:
 I suppose you have an SCM problem with Batik class. The actual release
 delivered with FOP last build xml-fop_20020516103601.tar.gz
...
 But running result build, I get the following.
 ..
 WARNING: child LM not a BPLayoutManager:
 org.apache.fop.layoutmgr.BlockLayoutManager
 null
...
 java.lang.NullPointerException
 at
 org.apache.fop.layoutmgr.LineBPLayoutManager.getNextBreakPoss(LineBPLayoutMa

You appear to have donwload a development snapshot. They
don't work at all. Get a regular distribution, the last
one is 0.20.3

J.Pietschmann



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




Re: Line breaks and other typographical stuff (was: Re: Latest FOPschema)

2002-05-14 Thread J.Pietschmann

Arved Sandstrom wrote:
 This would not be covered in UTR 14, Line Breaking Properties?
 (http://www.unicode.org/unicode/reports/tr14/).
 

Thanks, that's what I was looking for. It's even mentioned
in the data file I looked at...

J.Pietschmann


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




Re: page-number-citation in combination with force-page-count

2002-05-14 Thread J.Pietschmann

Arnd Beißner wrote:
 I don't see how I could use a page-position=last property for this, 
 either.
This could work if it were implemented in FOP.

 Did I stumble upon a missing feature in XSL:FO,
Yes. There is no feature to really *count* pages, you can
only cite page numbers.

Postprocessing with iText or implementing an extension
element might help.

J.Pietschmann


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




Re: AW: Latest FOP schema

2002-05-11 Thread J.Pietschmann

J.U. Anderegg wrote:
From the external view block means a rectangle containing formatted text,
 something like a paragraph.
 
 o What do fo:blocks as children of fo:blocks: mean for the end user?

Rectangular areas, perhaps indented and with border, padding
and other individual traits, nested into a rectangular area.

A user might be tempted to see them as higher level structures,
like HTML DIV elements, or (nested) sections or whatever. That's
not too bad but can be very misleading at times (for example,
a headline probably has to be *mapped* to a fo:block too).

Nested fo:blocks can be used by the transformation designer for
pure technical reasons, for example to define certain properties
for a longer stretch of text, without any corespondence to the
structure of the original document.

 From this point of view, it has bee a very good idea to name a
fo:block a block and not a paragraph. In the same sense, fo:table
should probably have been named grid.

BTW: the list related FOs are redundant, aren't they? Or am I
missing something that can't be easily mapped to a table (grid)?

 o What's teheffect of block's in combination with tag element TEXT like
 leader, marker, inline, wrapper, basic-link?

There are some hassles with whitespaces. There is some similarity
in handling fo:leaders to handling whitespaces.

 o When is a block required?

If you want to put text where a block level FO is expected.

J.Pietschmann


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




Re: Latest FOP schema

2002-05-10 Thread J.Pietschmann

Chuck Paussa wrote:
 background-position applies to block-level and replaced elements
 (What are replaced elements?)

This seems to be an odd artefact of not having checked everything.
The background-position property is a shorthand for combinations
of the background-position-(horizontal|vertical) stuff, which in
turn apply, as noted there to everything to which background
applies, which is, ugh, every element (7.29.1). This all sucks,
you should report a spec bug to the editors (well, read the amendments,
it could already be there...)
I believe replaced meant floating elements and footnotes originally,
but the point is moot anyway.

 max-widthmin-heightmin-width  apply to all elements except 
 non-replaced inline elements and table elements
 (What are non-replaced inline elements?)

These properties are mapped to i-p-d or b-p-d, the constraints should be
looked up there. It seems they cannot be determined statically, because
both mapping and applicability seems to depend on the context, therefore
the properties should probably allowed everywhere.

 position applies to all elements, but not to generated content
 (What is generated content?)

Hmm, again, it's a shorthand for setting absolute-position and
relative-position. The interesting point is that according to these
properties, the settings static and relative make only sense for all
block-level and inline-level FO, while the other two settings,
absolute and fixed would only apply to block-container. It seems to
follow that position applies to all block-level and inline-level FO
elements. Again, looks like a spec bug.

Confused? Me too!

J.Pietschmann


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




Re: Border properties

2002-05-06 Thread J.Pietschmann

Arved,

thanks for the explanations. I still find it confusing
that in the following (default western script) the left
visible edges would not line up:
  fo:blockstuff/fo:block
  fo:block border-style=solid border-width=5mmMore
stuff /fo:block
In order to have it line up, the start-indent has to be
set to 5mm. This, well, sucks. I'm pretty sure there are
other who'll be confused too.
Is this some CSS inheritance I have missed?

  I took a quick look at table.fo (the FO) and I think this will probably help
  out. I have to admit if there is one area of the spec that I am not
  particularly familiar with it is tables - in this case I don't think there
  is any weirdness involved stemming from table border properties.

Well, table borders apparently are handled the same way
as ordinary block borders, i experimented a bit. This
appears to be consistent.

The problem remains:
Now, what is the problem bug 684 complains about?

I still have no idea: is the problem fixed or not? For
a start, I'm not quite sure what the problem reporter
meant, because I've never seen tables.fo rendered by
an older FOP version. I have to say it looks ok for me,
but then I have missed important things before.

J.Pietschmann


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




Border properties

2002-05-05 Thread J.Pietschmann

Hello,
I tried to make something out of bug 684. Again, after
reading the spec in depth, I'm nearly biting pieces off
my keyboard.
In the tables.fo examples, the left edge of the table
content rectangle is the same as the edge of the reference
area, and left border (should I use start edge border?)
is tacked on so that it extends outside the reference area.
The upper and lower border, however, do not overlap previous
or following blocks, as expected.
Well 4.4.1 says
  the start-edge of its allocation-rectangle ... offset from it
  inward by a distance equal to the block-area's start-indent
  plus its start-intrusion-adjustment (as defined below)
  minus its border-start, padding-start, and space-start values...
given that the start-indent of the tables are zero (hopefully),
the behaviour regarding the border extending left beyond the
edge of the refernce area appears to be consistent with the spec,
albeit IMO a bit counter-intuitive, because not consistent with
what happens in BPD.

Now, what is the problem bug 684 complains about? Does it mean
the border in BPD should be handled similarly to what happens in
IPD? Or does he mean something else?
And, of course: is my understanding on how borders/padding should
be handled resonable? I feel very confused.

BTW what happens if both start-indent and margin-start were
defined on the same block area?

J.Pietschmann


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




Re: Does FOP support PDF Form-filling fields?

2002-05-04 Thread J.Pietschmann

Jeff Kowalczyk wrote:
 I'm not sure what the exact name of the PDF feature is, but does FOP
 support, directly or indirectly, the PDF technique that allows the
 end-user of the PDF to click a page area and type in form information?
 
 I've seen this best done on an IRS Tax Form (1040EZ), but I don't know
 if this is a standard part of the PDF spec,

Forms and and a customized variant of JavaScript are part
of the PDF 1.4 spec. They work somewhat similar to HTML
forms. There could be some limited support constructed
from multi formatting objects (XSLFO spec 6.9), but this
would be awkward. Specifically for embedding forms into
PDF there is a FOP patch providing extension elements
for embedding stuff in the PDF. You'll need a solid
knowledge of the PDF spec to use this, look on the
adobe server:
  http://partners.adobe.com/asn/developer/acrosdk/docs.html#filefmtspecs
  http://partners.adobe.com/asn/developer/acrosdk/docs/filefmtspecs/PDFReference.zip

The extension element will likely be included in the next
FOP maintenance release.

  or something that is hacked
  together with proprietary scripting that perhaps only Adobe tools
  support.

The PDF format and everything it contains is intellectual
property of Adobe and therefore proprietary.

J.Pietschmann


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




Re: Does FOP support merging a PDF doc with a new PDF stream?

2002-05-04 Thread J.Pietschmann

Jeff Kowalczyk wrote:
 Does FOP's API, or any combination of supporting tools, have the ability
 to render/import a simple FO-PDF document consiting of text positioned
 in absolute coordinates on the page, and overlay/merge it with a
 background document that already exists in PDF.

FOP can only redner FO to PDF (and other formats). For
manupulating existing PDF documents you have to use
other tools. Usually iText (http://www.lowagie.com) is
recommended. The iText library is, well, a Java library,
you have to build your customized processing tools on
top of that. For extracting information from existing
PDF you'll need some knowledge of the PDF spec
  http://partners.adobe.com/asn/developer/acrosdk/docs.html#filefmtspecs
perhaps quite extensive knowledge. PDF is not designed to
provide for that.

J.Pietschmann



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




Re: [REDESIGN] Line layout manager discussion

2002-05-04 Thread J.Pietschmann

Arved Sandstrom wrote:
 I couldn't tell from the SVG source what you prepared the file with. I would
 like to use SVG myself. There is no way I am going to handcode it, though
 (just as with FO).

Tell me what you need and i design a diagram description
language and an XSL to transform it into SVG. :-)

J.Pietschmann


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




Re: Shrink oversized pages to paper size

2002-05-02 Thread J.Pietschmann

David Frankson wrote:
 I have a fo document for printing mailing labels and positioning on the
 printed document needs to be exact.  FOP generates a perfectly spaced PDF
 document, but when I print it, Acrobat scales it down a bit and throws the
 whole thing off.  Digging around I found that unchecking Shrink oversized
 pages to paper size makes it print exactly what I want, but Shink is
 checked by default and all users would need to remember to uncheck it before
 printing.
 
 My page was defined with a .5in top and bottom margin and a .1875in
 left/right margin, and I experimented with the margins to try to keep it
 from shrinking, but had no luck.  No matter how large I make the margins, it
 still shrinks it.
 
Use the width and heigth properties of your page-master(s) to
define the page size. Fiddling with the margins is of no use here.

Check what measurements Acrobat Reader provides for the paper, and
use this, perhaps something slightly smaller to account for
round-off errors.

J.Pietschmann


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




Re: properties

2002-05-01 Thread J.Pietschmann

Bertrand Delacretaz wrote:
 On Wednesday 01 May 2002 18:19, Peter B. West wrote:
 
Does the near-silence on this one signify consent?
 
 
 I don't know enough about this to give meaningful advice, so in my case yes, 
 silence means consent.
 
Yes, it ought to be a reasonable idea.

J.Pietschmann


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




Re: New to fop

2002-04-29 Thread J.Pietschmann

Nollet Patrick wrote:
 Hi everybody,
 
 I'm new to FOP and I'm getting trouble to find some relevant examples about
 the use of this library. Is there any Javadoc, java source code and simple
 examples to transform an xml to a pdf file ?

Check the doc directory.

 I've built the examples but I had no control on the ant process, so I
 suppose that .fo files are xml files but were is the xsl file used in the
 simple.fo example ?
 
There is no XSLT file involved in this example, if you mean this.

 Where can I find some resources (java code, javadoc and examples) ?
Check the doc/examples and the javadocs directories.

J.Pietschmann



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




Re: Interesting Aside

2002-04-28 Thread J.Pietschmann

Rhett Aultman wrote:
 Hear hear!  XSLT and XSL-FO have been, in my line of work, the killer apps of XML.

Exactly. Half a year ago I started to use XML+XSLT+FOP for
a variety of formal letters, after I found it too hard to
get Word auotmated for simple tasks. Surprisingly, I'm
faster to type XML (using Emacs+PSGML) then to fiddle with
the various Word positioning and paper format stuff (there's
*always* something wrong). Paper and envelope measurements
(unscrupolously lifted from
   http://www.cl.cam.ac.uk/~mgk25/iso-paper.html)
are stored in a separate XML file, together with folding
marks, address placement boxes and sensible margin settings,
and are selected via an XSLT parameter. Now i can concentrate
on content rather than guessing where Word thinks it should
put addresses, subjects and headers.

J.Pietschmann





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




Re: Insufficient Karma!

2002-04-28 Thread J.Pietschmann

Peter B. West wrote:
  Access denied: Insufficient Karma 
This seems to be a recurrent problem. I thought you've
read the maling list.. bg
  http://marc.theaimsgroup.com/?l=fop-devm=97915458410778w=2


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




PDF encryption

2002-04-28 Thread J.Pietschmann

Hi all,
for the archives, I've written a small proof-of-concept
program which couples FOP and iText in order to provide
PDF encryption. Watermarking and everything else, possibly
even Henrik Holle's total page count problem, could be
done in a similar way.
Most of the iText code is directly copied from Lowagie's
enctryption utility.

Home page: http://www.lowagie.com/iText/

   public static void main(String args[]) {
 try {
   ByteArrayOutputStream fopout=new ByteArrayOutputStream();
   FileOutputStream outfile=new FileOutputStream(args[2]);
   Driver driver =new Driver();
   driver.setOutputStream(fopout);
   driver.setRenderer(Driver.RENDER_PDF);
   Transformer transformer=TransformerFactory.newInstance().newTransformer(new 
StreamSource(new File(args[1])));
   transformer.setParameter(page-count,#);
   transformer.transform(new StreamSource(new File(args[0])), new 
SAXResult(driver.getContentHandler()));
   PdfReader reader = new PdfReader(fopout.toByteArray());
   int n = reader.getNumberOfPages();
   Document document = new Document(reader.getPageSizeWithRotation(1));
   PdfWriter writer = PdfWriter.getInstance(document, outfile);
   writer.setEncryption(PdfWriter.STRENGTH40BITS, pdf, null, 
PdfWriter.AllowCopy);
   document.open();
   PdfContentByte cb = writer.getDirectContent();
   PdfImportedPage page;
   int rotation;
   int i = 0;
   while (i  n) {
 i++;
 document.setPageSize(reader.getPageSizeWithRotation(i));
 document.newPage();
 page = writer.getImportedPage(reader, i);
 rotation = reader.getPageRotation(i);
 if (rotation == 90 || rotation == 270) {
   cb.addTemplate(page, 0, -1f, 1f, 0, 0, 
reader.getPageSizeWithRotation(i).height());
 }
 else {
   cb.addTemplate(page, 1f, 0, 0, 1f, 0, 0);
 }
 System.out.println(Processed page  + i);
   }
   document.close();
 }
 catch( Exception e) {
   e.printStackTrace();
 }
   }

Have fun
J.Pietschmann


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




Re: PDF encryption

2002-04-28 Thread J.Pietschmann

Geez, self-followup:
writer.setEncryption(PdfWriter.STRENGTH40BITS,
  pdf, null, PdfWriter.AllowCopy);

If I set encryption to STRENGTH128BITS, as the original
had, Acrobat Reader 4.0 complains about Error while
decrypting. Probably an export restriction :-(, so be
careful.

J.Pietschmann


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




Re: line layout commit

2002-04-28 Thread J.Pietschmann

Arved Sandstrom wrote:
 What we lack is ownership. We could even combine this
 with BugZilla ownership, possibly.

Creating an assigned bugzilla entry (ENH) works for
other projects. I still think it's not quite sufficient
for broad-scoped changes like the current redesign, but
it might work well in the future when core changes will
become more incremental again.

J.Pietschmann



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




Re: Manipulating page-width / page-height

2002-04-24 Thread J.Pietschmann

Torsten Erler wrote:
 Is there any way to invoke the width and height property of the PageMaster
 instance, to set this page properties from within the java code??? In my xsl
 template no width and height is set, but the rendered page comes with
 576000x792000 mpixels. Can I manipulate the properties with my data (and if
 yes where!).

There are a lot of properties. The easiest way is probably
to use XSLT parameters.
Declare global parameters in the XSL file:
   xsl:stylesheet xmlns:xsl=... ...
 xsl:param name=page-height/
 xsl:param name=page-width/

and use them in the page-master
xsl:template match=/
  ...
  fo:simple-page-master master-name=...
 page-height={$page-height}
 page-width={$page-width}
 ...
Look up details in the XSLT spec:
   http://www.w3.org/TR/xslt

You can set values for the parameters from your Java code
by using the setParameter() method of your transformer:
transformer=factory.newTransformer(xsl);
transformer.setParameter(page-height,29.1cm);
transformer.setParameter(page-width,21.9cm);
Lookup details in the JAXP documentation.

J.Pietschmann


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




Re: best approach for labels use-case

2002-04-24 Thread J.Pietschmann

Randall J. Parr wrote:
 My current need is to output chunks which are,
 more-or-less, formatted like from/to/postage blocks
 on an envelope. The chunks are full page width
 and slightly less than 1/3 page long (thus fitting 3 per page).
...
 Should I treat each envelope as a table? Each page as a table?

Each page as a three row table seems to be appropriate. Put a
break-before=page on the table.

J.Pietschmann


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




Re: what does IPD refer to? ie how to fix table error re IPD

2002-04-24 Thread J.Pietschmann

Randall J. Parr wrote:
 [ERROR]: At least one of minimum, optimum, or maximum IPD must be 
 specified on table.
 
 What does IPD refer to?

It means inline progression dimension, or width for
the average western european (height for guys who
write in columns instead of lines).

 That is, how best to fix this?
It depends on what you are trying to achieve. Either
specify an absolute width for each column, or a width
for the whole table.

J.Pietschmann


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




Re: Exception message text not bubbling up

2002-04-23 Thread J.Pietschmann

David B. Bitton wrote:
 My current implementation passes the Driver into the Sax transform.  If the
 transform creates malformed xsl:fo, which is a possibility, the FOPException
 that is raised by FOP, is coming up to the top as an NPE and not the actuall
 message text.
 
 For example, line 149 of org.apache.fop.pagination.PageSequence:
 
 throw new FOPException(page-sequence must be child of root, not
 
+ parent.getName());
 
 is eventually thrown by the Transformer as a TransformerException, but when
 I getMessage(), it's an NPE.  Any idea why this would be?
 
Are you sure you don't have something else which causes the parser
or the transformer to throw a NPE?

With the following code
  try {
Driver driver=new Driver();
driver.setRenderer(Driver.RENDERER_PDF);
driver.setOutputStream(...);
Transformer transformer=TransformerFactory.newInstance()
  .newTransformer(new StreamSource(new File(stuff.xsl)));
transformer.transform(new StreamSource(new File(stuff.xml)),
 new SAXSource(driver.getContentHandler()));
  }
  catch( Exception e) {
System.out.println(e.getMessage());
  }
I get the page-sequence must be... message without a problem, and
the caught Exception is a TransformerException.


J.Pietschmann


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




Re: Image clipping with svg

2002-04-23 Thread J.Pietschmann

Rhett Aultman wrote:
 What version of fop are you trying this with?  Additionally, I don't see
  an external.fo in the docs\examples\fo\ directory.

There is one in docs/examples/svg.

J.Pietschmann


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




Re: Workaround to preserve whitespace?

2002-04-23 Thread J.Pietschmann

Niklas Backlund wrote:
 I noticed that the white-space-treatment property is
 yet to be implemented in FOP, and most of my documents
 relies heavily on preformatted content (mostly code
 examples).

You can use white-space-collapse=false which has the
somewhat unconforming side effect of preserving line
feeds too.

Yes, this has been mentioned before:
  http://marc.theaimsgroup.com/?l=fop-devm=101914568126394w=2
:P

J.Pietschmann


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




Cleaning up bugzilla and next maintenance release

2002-04-22 Thread J.Pietschmann

Hi committers,
as you probably noticed, i started to rummage around in
Bugzilla, searching for bugs still in existence and learning
more about current and persistent problems.

Apart from the keep-* problem there are the following issues:
- Other unimplemented or incompletely implemented elements
  and attributes. In particular:
   o fo:table-and-caption because DocBook uses this
   o fo:inline-container
   o common properties of fo:inline
   o whitespace handling attributes
   o a few shorthands
- Height/BPD of block elements other than table.
- Padding for fo:block (and perhaps other block elements)
- Margins for tables, if that's a bug (see recent posts)
- Better error reporting, in particular:
   o Report structure violations properly (for example don't
 drop fo:table-rows which are not children of
 fo:table-(body|header|footer) silently)
   o Notify about attributes which shouldn't be there or
 are not implemented. Currently, this is horribly
 inconsistently handled.
   o A few more sensible messages for attributes that are
 missing. I think, if a master-reference is missing,
 claiming it has no proper value is misleading.
- Link hotspots. I think i have some unique bug reports
  to contribute in addition to the respectable set already
  in place :-)
- Text loss near fo:inline and -horror!- character references!
- Image scaling.
Not yet in Bugzilla, i think:
- Problems with properties of hypenated words (many
  are only applied to the last part).
- conditional-page-master last
- Clipping (overflow=hide or something)
Probably further down the ToDo list:
- Better handling of forward ref page-number-citations
   (reformat line or something). Hopefully solvable locally.
- Sensible algorithm to handle leader-length.maximum=100%,
   perhaps combined with point above. Should be localised
   to a line, therefore only moderatly hard. This is definitely
   a must have.
- PDF extensions, like encrypting. Perhaps integration with some
   other project.

I think i'll leave Bugzilla alone until the next bug summary
next weekend.

Questions:
Will there be another maintenance release before something comes
out of the redesign?
If so, when? Roadmap?
If so, which should be the problems solved? Pick from above or
add whatever you think should be added.

Further question: Is the duplicate id bug fixed in all its
incarnations?

Oops: The FAQ goes along slowly, as usual. Converted to the
FAQ-with-sections DTD referenced recently on the forrest-dev
list.

Thanks
J.Pietschmann


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




Re: error generating font metrics file

2002-04-22 Thread J.Pietschmann

Randall J. Parr wrote:
 LOCALCLASSPATH=\
 ${FOPHOME}/build/fop.jar\
 :${FOPHOME}/lib/xerces.jar\
 :${FOPHOME}/lib/xalan.jar\
 :${FOPHOME}/lib/batik.jar\

In my distribution there is no xerces.jar nor a xalan.jar in lib.
There is a xerces-1.2.3.jar and a xalan-2.0.0.jar. Did you rename
the files?


 Exception in thread main java.lang.NoClassDefFoundError:
   org/apache/xml/serialize/BaseMarkupSerializer

There appears to be a problem locating a certain class
which should be in the Xerces jar (not necessarily xerces.jar).

I recommend to check the classpath again.

J.Pietschmann


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




Re: SVG rendering with FOP on Solaris

2002-04-22 Thread J.Pietschmann

Cory McNeely wrote:
 We're trying to use FOP in a 'headless' environment on Solaris.
..
Does anyone have a good reference or
 example of the steps involved to make this work in a headless environment
 with Solaris? Either the PJA or the Xvfb solution would be satisfactory,
 although the PJA solution seems preferable. Has anyone gotten this to work
 on Solaris?

I got PJA running with WebSphere 3.something on AIX, the
instructions on the PJA website are as foolproof as i've ever
seen. Solaris shouldn't be any harder. I still have some
problems with SVG fonts, but i don't care, i use
svgStroke=false anyway.

J.Pietschmann



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




Re: java/util/HashMap error

2002-04-19 Thread J.Pietschmann

Mathy V Arumugam wrote:
 I have posted this que. to the fop-user list and no resp.  Hope someone 
 could help me...
 
 I am using JDK 1.3.0_02 along with javawebserver2.0.
 
 My servlet is failing at
  Driver dr=new Driver();
 
 Error:
  java.lang.NoClassDefFoundError: java/util/HashMap
  at org.apache.fop.fo.FOTreeBuilder.init(FOTreeBuilder.java:85)

You don't have access to the Java run time library.
This is not a FOP problem. Ask the javawebserver guys
what magic you have to apply.
Chances are that you either have to deploy the FOP
jars and/or your class files somewhere else, or you hit
a bug in the webserver.

Unless someone else on this list uses javawebserver,
you wont get further help on this list for this
problem.

J.Pietschmann


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




Re: FOPException error

2002-04-19 Thread J.Pietschmann

Mathy V Arumugam wrote:
  Has anyone experience a problem like below?  I can't figure out why there is
 a difference when running this code in a Java application vs. a Servlet.
 
 In Java application, code runs great, but when it runs in a servlet I have
 the following error:
 
 org.apache.fop.apps.FOPException
 at org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandler.java:109)

This is becoming a VFAQ.

Most probably, your servlet does not have a XML parser
in the classpath. Check your application server documentation
how to get the Xalan.jar and Xerces.jar delivered with
FOP into the classpath in effect for your servlet.

There may be a number of other reasons, like misconfigurations
and conflicts with other parsers, the exception message should
have some characteristical details in this case (don't snip
a root cause or original exception, if it is available
in the backtrace).

J.Pietschmann



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




Re: Indenting Tables

2002-04-18 Thread J.Pietschmann

Roger Tribe wrote:
 I am trying to indent individual tables from the page margin without 
 success.

This appears to be intentional, though inconvenient. I read
the spec about a dozen times, or so, and the behaviour
appears to be conformant. Tables are not block level
elements for some strange reason.

I usually create an invisible column serving as margin:
   fo:table table-layout=fixed
 fo:table-column column-width=2cm/
 fo:table-column  border-color=black border-style=solid
   border-width=.5mm column-width=3cm/
 fo:table-body
   fo:table-row
 fo:table-cell/
 fo:table-cell
   fo:blockstuff/fo:block
 /fo:table-cell
   /fo:table-row
 /fo:table-body
   /fo:table

If you use XSLT to generate the file, it should
not be too hard to keep block margins and the table
column width consistent.

 I have tried using margin-left, start-indent and position-absolute on 
 the table node and although the text position within the cell moves,
Thats because table cell areas are reference areas.
You have to reset most block properties on the table
element if you don't want to have them inherited.

J.Pietschmann


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




Re: Keep-Together

2002-04-18 Thread J.Pietschmann

David B. Bitton wrote:
 Can someone give me a 100 words or less on keep-together?  What I'm most
 confused is using 1 through 9 as apposed to always.  I think my
 keep-together problem would be solved with this, but I'm not sure how to use
 it.  Tx :)

I don't think keep-together will solve your problem
if you are using FOP, because it's not implemented.

For the numbers: they indicate the strength of the
keep condition, higher numbers mean greater strength.
This is useful because long stretches of keep may have
to be broken anyway.
An example:
  fo:block keep-together=1
fo:block keep-together=3
/fo:block
fo:block keep-together=5
/fo:block
  /fo:block
If the span is too long to fit the available space
(the page, for example), or there are other conditions
which lead the renderer to the conclusion that there
should be a break anyway (for example because large
white areas look awful), the strenght of the
keep-condition is used to determine your preferences
for a break. In the example above, the renderer will
first check whether a break between the two embedded
blocks will be acceptable, because that's the keep
whith the lowest precedence. If that fails, it will
try to break within the first embedded block, and
if this still fails, it will try the second.

Does this help?

J.Pietschmann


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




Re: Problem embeding pdf in browser using security constraint inTomcat 4.0.3

2002-04-18 Thread J.Pietschmann

Alberto Alarcon wrote:
 Hi
I am using FOP to embbed pdf files in browser with a servlet, using
 tomacat 4.0.3, I try the FOPSERVLET example and its working fine, but if =
 I
 put the security constraint in the web.xml file of my context , I get a
 white page, instead of de pdf file, the pdf file is generated correctly, =
 if
 I save to disk, i can see it, but is not showed in the browser.

What do you mean by security constraint? Do you get your
PDF again if you remove the security constraint? It this
case it is likely that this is a problem with your server.

Otherwise, it may be your browser, some IEx versions are
known to have problems starting Acrobat reader under certain
circumstances.
 fop Fop-0.20.3rc
It is recommended to upgrade to the final 0.20.3 release
in all cases.

J.Pietschmann



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




Re: linefeed-treatment=preserve

2002-04-18 Thread J.Pietschmann

Shawn Bedard wrote:
   property - linefeed-treatment is not implemented yet.
 
 It seems to me that there has to be a way to get around this.  Surely,
 someone out there has CRs in their data that they want to render?

You can try enclose CR delimited blocks at the XSLT level.
The usual approach is to write a recursive template

   xsl:template name=make-block
 xsl:param name=text
 fo:blockxsl:value-of select=
   substring-before($text,'#xA')/
 /fo:block
 xsl:call-template name=make-block
   xsl:with-param select=
 substring-after($text,'#xA')/
 /xsl:call-template
   /xsl:template

Use this like
   xsl:template match=description
fo:block
  xsl:call-template name=make-block
   xsl:with-param select=.
 /xsl:call-template
   /xsl:template

Put font, spacing and other properties on the enclosing
block. If you have mixed content, this is more of a
challenging problem, as the approach above wont work.

Look at the XSL FAQ and into the XSL mailing list archive
for more tricks:
  http://www.mulberrytech.com/xsl/xsl-list/

HTH
J.Pietschmann


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




Re: wrong lists - 2cents

2002-04-18 Thread J.Pietschmann

Jeremias Maerki wrote:
 You may be right. It may be a weak argument that the dev/user scheme is
 used all over the XML project. In this regard your thought should
 probably be targeted one level higher up.

Well, it's an apache standard, and the generally
copied charters state clearly:
   dev: discussions *among* developers
   user: user discussions and help
There is the option to use bugzilla for feature
requests (i don't know whether this is used for
FOP, is is handled this way for Ant)

J.Pietschmann


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




Re: Embedding FOP

2002-04-18 Thread J.Pietschmann

Hans-Jürgen Wiesner wrote:
 Hello all,
 I'm new to FOP and are charged with embedding it in a Servlet
 application. We need to send a JSP as HTML or PDF, depending on the
 user. So we made a JSP which outputs valid XHTML and tried to convert
 that via FO into PDF.
 After much experimentation, I succeeded in installing a filter
 intercepting the JSP-Servlets output to convert it by calling FOP.
 The conversion works on the command line; however, I have great problems
 embedding FOP in my filter.

It is usually not a good idea to use JSP to generate
XML for further processing.

Well, you can use a SAX event stream to overcome the
unfortunate design of the XSLTInputHandler, look here:
  http://marc.theaimsgroup.com/?l=fop-userm=101735493205659w=2
This way you can supply an arbitrary XML source to your
transformer.
For generating the data, i suggest to look into writing
your own SAX source. The basics are much easier than many
people think: implement the javax.xml.parser.XMLReader
interface, and if necessary provide your own implementation
of an InputSource to provide run time parametrization.

 The next problem is that FOP doesn't convert when called from my filter.
 I get an exception from driver.render(); the logger tells me:
 
 INFO10191   [fop ] (): building formatting object tree
 DEBUG   10191   [fop ] (): setting up fonts
 ERROR   10191   [fop ] (): Unknown formatting object ^html
 
Your transformation transforms your XML to XHTML. You have
to write a transformation which transforms into XSLFO. FOP
can not render XHTML (it would be named XHTMLP if it could)

J.Pietschmann


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




Re: Confused with Fop extensions, distinct.

2002-04-16 Thread J.Pietschmann

Rich Van Deren wrote:
 I have tried to read the docs. I had used distinct before but not in an 
 embedded application.
 Function not supported. Is my error message.
...
 xsl:for-each 
 select=xalan:distinct(/Resume/WorkHistoryInfo/...

This is an extension function. You appear to have
a problem with the Xalan installation which is used
by your embedded FOP.

Either your application uses an outdated Xalan version
(as for example WebSphere 3.x does), or extension
functions have been disabled. Find a Xalan version
which works and install it so that your application
uses it. Consult the manuals of your application for
how to do this, usually you have to copy your Xalan
jars into a certain directory, and/or adding them
to the classpath.

Alternatively, get rid of the extension function and
use Munchean Grouping. Start here:
   http://www.jenitennison.com/xslt/keys.html

J.Pietschmann


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




Re: absolute positioning in an pdf

2002-04-15 Thread J.Pietschmann

Enrico Horn wrote:
 When FOP writes a line in PDF with spacing between
 characters for instance in a table with 2 or more cells per rows
 or words in general each word is positioned relative to the last one on
 the same line.
 What I would like to do is to make the start position of each word
 absolute. Is there any way to do this?
 Where would I have to start looking?

I'm not sure what you problem is, but you can specify
absolute positions in XSLFO by specifying
absolute-position=absolute and setting the
left/top/right/bottom properties. Look into the spec:
  http://www.w3.org/TR/xsl/slice7.html#common-absolute-position-properties

HTH
J.Pietschmann



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




Re: Non rendered characters in and around fo:inline tags at pagebreak

2002-04-13 Thread J.Pietschmann

Nicolas Mazziotta wrote:
 When a fo:inline  element occurs at page break,
  its text() happens not to be rendered..
 What can I do?

You can post a small FO file demonstrating the problem
to the list.

J.Pietschmann






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




Re: AW: Multithreading FOP ?

2002-04-13 Thread J.Pietschmann

Peter B. West wrote:
 Please indulge my ignorance again.  May I assume that it is not possible 
 to run two main()s in the same VM?

Not in the sense you probably mean.

  From this discussion so far I have gained much more insight into the 
 nervousness about statics.  Is the problem that servers want to execute 
 multiple instances of classes within the one VM?  Are there other problems?

The problem is multiple threads accessing static class data,
which is really global.
Well, the standard scenario is: There are multiple threads
sleeping while waiting for requests. One thread wakes up,
sets the FOP baseDir, creates a Driver instqance and starts
rendering. Just before the thread is about to resolve an URI
for an external graphic, it is suspended and another thread
gets a chance to run, it reads its request, sets the global
baseDir to soemthing else, and is itself suspended in favour
for the first thread, which reads the now changed value for
baseDir from the configuration, and explodes.

It doesn't help to make the Driver methods synchronized,
because there are two instances of the driver object :-(
you would have to lock the global configuration data so
that the second thread would have to wait until the first
finishes processing. Of course, this nullifies the advantages
of using multithreading, especially on MP machines.

I like the approach JAXP did for transformers. You have
a factory where you can set default stuff so that you
don't have to do this every time an individual processor
is created, and you can override settings on the individual
instances. The individual processor instances never access
global data after creation.

Does this answer your question(s)?

J.Pietschmann


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




Re: Bug handling (was: Re: fo:marker broken)

2002-04-12 Thread J.Pietschmann

Keiron Liddle wrote:
 Bug reporting, fixing and handling is of course important to the process.
 The main problem is that many of the bugs are being fixed in the 
 development but are not easy or appropriate to fix in the maintanence 
 branch.

The problem with the bugzilla backlog is that there
are quite a few duplicates and already fixed bug
in there. In particular, there is half a gadzillion
equivalents of the well known OutOfMemoryException
stuff, and other recurrent issues.

 I'm focusing on the development to fix those bugs, it would be good if 
 someone could put a bit of effort into the bug handling process.

I read this as It's ok?

J.Pietschmann



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




Re: page-number

2002-04-10 Thread J.Pietschmann

Henrik Holle wrote:
 how can i count all pages in my document? i have different page-sequence
 master-reference but want to something like : this document has 12 pages.
 is it possible?

Yes, you got some hints already.
Keep in mind that this will force FOP to keep all
pages in memory until the last page is rendered.
If you get a memory overflow exception, remove the
forward reference to the last page first.

J.Pietschmann




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




Re: infinity character and PDF

2002-04-10 Thread J.Pietschmann

Jens v. Pilgrim wrote:
The infinity character (Unicode: #8734; , HTML: infin; ) is
 rendered correctly by the AWT and Print renderers, but incorrectly by
 the PDF renderer...(I've got a '#' there).

Try fo:inline font-family=Symbol#8734;/fo:inline

I think it's a problem with the character mapping tables. By
default, FOP uses only a few standard fonts defined by Adobe
for PDF generation, it does not use any Unicode fonts. If you
get a #, check in which font the glyph is and change to it.

J.Pietschmann





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




Re: fo:marker broken

2002-04-09 Thread J.Pietschmann

Christian Geisert wrote:
 J.Pietschmann wrote:
 fo:marker is broken in 0.20.3
 I plead guilty for this bug ;-)
 But it has been fixed for the 0.20.3 final release.
 The glossary example works for me.

Oops, i just discovered i've build my FOP from 0.20.3rc2.
The final release works indeed.
Sorry for the confusion.

BTW: I took initiative and set the associated bug #6009
to RESOLVED (accidentally).

Actually, does someone feel responsible for managing
bug reports? There seems to be a loong backlog.

I could take a look at it from time to time, in addition
to FAQ writing (progress is slow, but measurable).
A word from the committers?

J.Pietschmann


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




Re: Extension property mapping

2002-04-09 Thread J.Pietschmann

Matthew L. Avizinis wrote:
 Where is org.apache.fop.fo.properties.ExtensionPropertyMapping?
 I'm not following precisely how extension properties are mapped in
 ExtensionElementMapping.java.

It is generated during the build, presumably from
src/codegen/extproperties.xml. Look into build.xml for details.

Are you working on implementing your own extensions?

J.Pietschmann



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




Re: vertical alignment

2002-04-08 Thread J.Pietschmann

Joshua Marinacci wrote:
 I must be missing something, but for the life of me I can't figure out 
 how to create
 a single page with vertically centered text. I want to create a title 
 page which will have
 the text  Blah Blah by Whoever   on three lines, all grouped together in 
 the center
 of the page without explicitly setting how far down on the page it is.  
 I've set the vertical-align attribute of a block but it's still stuck at 
 the top of the page.

The attribute is display-align. You can use it on a region
(preferably with static content, or use it in a block element
which is as high as the page. Unfortunately, the height
property doesn't seem to work on a plain fo:block. A table
seems to work, try:
   fo:table table-layout=fixed
 fo:table-column column-width={you page width}/
 fo:table-body
   fo:table-row height={you page heigth}
 fo:table-cell display-align=center
   fo:block font-size=40pt text-align=centerfoo/fo:block
 /fo:table-cell
   /fo:table-row
 /fo:table-body
   /fo:table

J.Pietschmann


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




fo:marker broken

2002-04-08 Thread J.Pietschmann

Hi,
fo:marker is broken in 0.20.3 and causes trouble with
the docs/examples/marker stuff. The problem is that
the TextState ts variable in FObjMixed is not set at
all for Marker objects. The fix should be to copy
the parent state as it is done in Block.
Does someone feel responsible?

J.Pietschmann


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




Re: XSL - Unknown formatting object error

2002-04-07 Thread J.Pietschmann

Shawn Bedard wrote:
 I have a newbie question concerning the XSL parsing in FOP.  I think I have
 everything set up correctly because all the test work fine.  However, I have
 a
 series of really simple xsl files that parse with other tools.

First, get your nomenclature straight. An XSL file is an XML
document, which is parsed by an XML parser. The XSLT processor
stores/compiles this into something which will be used to
control a transformation. This transformation is applied
to an input tree, generated by an XML parser from an input XML
document, and produces a result tree, which could be serialized
into a result document.
FOP is something different from an XSLT processor (or an XML
parser) FOP uses and XML source with som special vocabulary,
XSLFO, and produces a rendered version in a Java widget or in
some other file format, like PDF.
It is common to produce the input for FOP, XSLFO, by an XSL
transformation. The FOP command line application allows you
either to supply an input FO and some output format, or you
can supply an input XML, an XSLT file which describes the
transformation from the input XML vocabulary into FOs, and
some output format description as in the first case. Xalan
is an XSLT processor which is used by default by FOP to execute
the transformation in the second case.


 [ERROR]: Unknown formatting object ^html
This means you are not generating the FO vocabulary FOP
expects, but HTML instead.

 What am I doing wrong?
The input for FOP, XSLFO files, is a quite different beast
the HTML.
Try the following XSL file, it will generate a very simple
XSLFO from your XML file:

  ?xml version=1.0?
  xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:fo=http://www.w3.org/1999/XSL/Format;
xsl:template match=/
  fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
fo:layout-master-set
  fo:simple-page-master master-name=simple
page-height=29.7cm
page-width=21cm
fo:region-body/
  /fo:simple-page-master
/fo:layout-master-set
fo:page-sequence master-reference=simple
  fo:flow flow-name=xsl-region-body
fo:block font-size=24pt text-align=centerGreeting/fo:block
fo:blockWords of greeting:/fo:block
fo:block font-weight=bold font-style=italic 
text-decoration=underline
  xsl:value-of select=greeting/
/fo:block
  /fo:flow
/fo:page-sequence
  /fo:root
/xsl:template
  /xsl:stylesheet

 Is there some special xslt standard that I don't
 know about.
Not XSLT, but XSL :-)

 Even if someone could provide me with some references and
 links concerning xslt sample for FOP that would be great.

You have to differentiate between XSLT, which governs transformations,
and XSLFO, which describes layout/formatting. You use XSLT to transform
your input XML into various other stuff, for example HTML or XSLFO.
You have to use different XSLT templates for different output.

HTH
J.Pietschmann


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




Re: Multithreaded failure

2002-04-05 Thread J.Pietschmann

Scott Moore wrote:
 org.apache.fop.configuration.Configuration.put(strokeSVGText, new
 Boolean(false));

Nitpick: there is a predefined Boolean.FALSE
  :-)

J.Pietschmann


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




Re: Question for FOP

2002-04-05 Thread J.Pietschmann

Cai, Jenny (US - Dallas) wrote:
 I just successfully run the examples (simple.fo) provided in 
 'fop-0.20.3-bin.tar.gz' file under fop-0.20.3\docs\examples\fo 
 subdirectory in the command prompt and I got a pdf file successfully . I 
 still have the following question:
 
 1. How can I view the source code for this example?
 
 2. I also looked over all the rest of the folders included in 
 'fop-0.20.3' and there are a lot other folders like design, 
 html-docs(some .html files in it), xml-docs(some xml files in it), etc.  
 What are all those files used for? 
 
 3. Actually what I want to do is:  convert a XML file to PDF file and 
 display this PDF file on the web page. How to do this?
 
What you are asking for is somewhat akin to
  I attended a guided tour at a military airbase. What I
   want to do is: attack some real life hostile jet fighters
   and have them shot down. How to do this?
Your best bet is probably to hire a professional who does
the job for you.
Of course, you can go all the way yourself. Others did it,
though they didn't start with the questions above.
Good luck.

J.Pietschmann



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




Re: Problems using table-header with FOP 0.19

2002-04-04 Thread J.Pietschmann

Seisdedos Juan, Francisco Javier wrote:
...
 I wrote two tables: one for blank space and the other one to
  write data. If the property space-before of the first table
  has a value of  500pt, it is shown right but if the value is
  450pt (like now), the table header is getting lost.

It works in 0.20.3, at least there are no headers missing.
Perhaps it's time to upgrade?

J.Pietschmann


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




Re: help to get started on WebSphere 3.5

2002-04-03 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:
 
 I have to generate PDF letters files. To do that I have decided to use 
 FOP files as letter templates supplying
 variables(name, address...) via XML. It is going to be a batch job, 
 running main method developing
 with Visual Age, WebSphere 3.5. Is anyone has examples?
 Most importantly, I have no idea what libraries to download, where to 
 install and how to configure.

You are asking for something big. Moreover, i can't
quite figure out what your actual requirements are.

The easiest way seems to be to contact your friendly
IBM support.
Other than that it would be useful to know:
1. How much experience do you have in running WebSphere
  and deploying code for WebSphere?
2. How much experience do you have in Java programming
  in general and in servlet/JSP stuff in particular?
3. How extensive have you already dealt with XML stuff?
4. How much experience do you have in developing
  XSLT/XSLFO?
5. How much experience do you have in running FOP?
6. What do you mean by batch job? Conventionally
  this is not used in assiciation with a web application
  server.

J.Pietschmann


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




Re: help to get started on WebSphere 3.5

2002-04-03 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:
 I am novice with XML, XSL, FOP.

I suppose you already downloaded the latest binary release of FOP.
First get some experience in running FOP by running some of the
examples from the distribution from the command line. Check the
documentation in the distribution for how to do this.

If you got around this, start developing you own FO file to gain
some more experience. Question related to FO design can be asked
on the XSL list (http://www.mulberrytech.com/xsl/xsl-list) or,
if they are FOP specific, on the FOP-user list.

After you have some working FO, design your input XML for the
variable date and start to generate them using XSLT.
Question related to XSLT design can be asked on the XSL list
exclusively. For questions about XML design check out the FAQs,
tutorials and lists listed on http://www.xml.org first.
Check the documentation for how to run FOP using an XSL
transformation.

If you got some working XSLT code you can run it from the command
line, start to embed FOP into your application. There is a file
embedding.html delivered with FOP with some hints. Look also
into the FOP servlet example in docs/examples/embedding. You don't
run any MAIN method. There are also recurring issues you can find in
the archives of the FOP lists
  http://marc.theaimsgroup.com/?l=fop-userr=1w=2#
  http://marc.theaimsgroup.com/?l=fop-devr=1w=2#

For deploying FOP, you need all the jar files from the lib directory
as well as fop.jar itself. If you want to deploy them as part of
a WebSphere application, there are some pitfalls. I think they
have been written about on the list, check the archives mentioned
above.

HTH
J.Pietschmann


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




Re: Linebreaks inside of tables etc.

2002-04-03 Thread J.Pietschmann

Cory McNeely wrote:
 1) How do I insert a blank line into a cell in a table object?
Use the space-before property or margin-top (the difference is that
space before will not be applied after a page break). For example:
  fo:block space-before=6ptSection 2: This is section 2 text./fo:block

 2. How do I format text (bold etc) with different formats in a fo:block. For
 instance if I want to make the sections of the previous example bold. I can
 accomplish this by wrapping them in their own fo:blocks, but that generates
 an unwanted newline.

Use fo:inline. For example
fo:inline font-weight=boldBold stuff/fo:inline

J.Pietschmann




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




Re: why doesn't fop take relative path for external graphic

2002-04-02 Thread J.Pietschmann

Katiyar, Bhawana wrote:
 Hi! I am trying to include an image using external-graphic element. It doesn't seem 
to take relative path.
 I don't want to specify the absolute path. 
The src attribute of the fo:external-graphics element
takes an URI as a value. Relative URIs are resolved
against the baseDir configuration setting. The
command line app by default uses the current working
directory as baseDir. You can also set it in the
userconfig.xml file. If you are using the command
line, be sure either to start it from the proper
directory, or tell it to use a userconfig.xml with
an appropriate setting.
If you are using FOP embedded in some other application,
for example in a servlet, the baseDir is usually
uninitialized. The symptom is a ...NotFound exception
with a URI that starts with (null).
You can set the baseDir in such a situation:
  String baseDir = url path to base;
  Configuration.put(baseDir, baseDir);
You can also set baseDir in the userconfig.xml and
use it:
   options = new Options(new File(path to userconfig.xml);
Yes, thats all, no further reference to the options
variable necessary.

J.Pietschmann






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




Re: Keep two table rows together

2002-04-02 Thread J.Pietschmann

David B. Bitton wrote:
 I have a table with data that is grouped every two rows.  The first row
 has data in cells, and the second row is a span, and it has additional info.
 How can I stop a page break between the two rows?

Have you already tried to set keep-with-next=always
on the first row?

J.Pietschmann



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




Re: orphan - widow

2002-04-01 Thread J.Pietschmann

Patrick Andries wrote:
 What is the status of the orphan and widow control ?
It is not implemented in 0.20.3, there is no precise timeline
(somewhen this year), it is not all that easy to implement
in the current design, and there is no schedule for the
redesigned FOP. There may be another maintenance release in
the short term, but certainly without orpahns/widows and
keeps.

J.Pietschmann



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




Re: How to keep space between two region/block/ ... while rendering?

2002-03-29 Thread J.Pietschmann

Anshuman wrote:
 Thanx for the useful tip. I am able to break the long table body 
 into pages. But this led to another problem. I am using
 fo:static-content flow-name=xsl-region-after/ to put the footer in 
 the page. But when the table breaks into more than one page, it overlaps 
 the area of footer and breaks only at the very end of the page. How can 
 I make the table break before the footer of the page ?

You can define a fo:table-footer similar to the fo:table-header,
so you don't really have to put table footer information into
static content. As for overlapping, it's the same as for
region-before: ensure the fo:region-body's margin-bottom is
at least as large as the extent of the region-after. I thought
this should be quite obvious meanwhile.

J.Pietschmann



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




Re: How to keep space between two region/block/ ... while rendering?

2002-03-27 Thread J.Pietschmann

Anshuman wrote:
 Can any one tell me how can I keep space between two fo:flow tag 
 or between two fo:block tag ?
 My problem is that I have a fo:static-content tag where I keep the 
 table header information and fo:flow where I keep the body. But when 
 the data in the header tags is more, it overlaps the body and hence I 
 loose the first 1-2 records of the table body.

It seems you approached the described problem from
a somewhat unusual direction.

You can arrange for header rows placed after every page
break this way:
   fo:table table-omit-header-at-break=false
  ...
 fo:table-header
   fo:table-row
 ...
   /fo:table-row
 /fo:table-header
 fo:table-body
   ...

If you really have to use static content for the header,
you should define your layout in a way that the areas don't
overlap, for example:
 fo:region-body margin-top=3cm/
 fo:region-before extent=3cm/

J.Pietschmann


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




Re: JAXP / upgrade to xerces2

2002-03-26 Thread J.Pietschmann

Christian Geisert wrote:
 I finally have Joerg's JAXP patch committed (well most part of it).
I want to note again that this effectively removes Xalan1 support.
It is probably a good idea to remove some cruft still left in,
like the Xalan1-compat libs, the build rules associated with Xalan1,
and the files in the tools directory should use JAXP directly instead
via the abstraction layer in tools/xslt. Moving to the default ant
task for doing XSLT probably will already take care of it. I will
look at it this weekend (provided the easter eggs are easy to find :)


 Still needs to be done:
 - build process (replace fop's xslt-task with ant's style-task as
   already done in the main branch)
 - hypenation generation (Joerg mentioned some problems)
One problem was that the dumped hyphenation classes are not rebuilt
if there the source of the generation classes is changed. Perhaps
there should be an intermediate jar file built for the generator,
and the dumped classes depend on it as well as on their source XML.

Regards
J.Pietschmann


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




Re: Problems with SAX pipeline

2002-03-26 Thread J.Pietschmann

Laurent Bihanic wrote:
 This application uses a SAX pipeline to apply an XSLT transformation 
 (XML - XSL-FO) and feed it into FOP's Driver directly through its 
 ContentHandler.
 
 FOP does not display any error message but the generated PDF file is 2 
 KB shorter than when generated from the same FO document read from a 
 file and Acrobat Reader complains that the file is damaged and could 
 not be repaired.

No.
I suggest to check your SAX stream first whether all elements are
properly closed. Try to feed it as a SAXSource to an identity XSL
transformation (use TransformerFactory.newInstance().newTransformer()).
The serialized file will be always well-formed (the transformer
closes open elements for you) but you could check for suspicious
omissions at the end.


J.Pietschmann


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




Re: SVG images and rendering fonts

2002-03-26 Thread J.Pietschmann

Toulson, Simon wrote:
  [problems with SVG text]

Also, check out the following hint about Acrobat Reader settings:
  http://marc.theaimsgroup.com/?l=fop-devm=101557378207628w=2

J.Pietschmann


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




Re: error while including svg in fop

2002-03-25 Thread J.Pietschmann

Katiyar, Bhawana wrote:
 I wish to include an external svg file in xsl:fo document. 
 I have the following lines in my xsl file:
 
  fo:instream-foreign-object
   svg:svg
...
 java.lang.NullPointerException
 at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)
  at org.apache.fop.svg.SVGDriver.buildSVGTree(SVGDriver.java:223)

Did you declare the svg namaspace somewhere?

J.Pietschmann


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




Re: error while including svg in fop

2002-03-25 Thread J.Pietschmann

Katiyar, Bhawana wrote:
 yes I declared in the begining in the root.

  svg:image xlink:href=file:d:\circle.svg
Check if the xlink namespace is also declared.
If that's ok too, try an absolute path
  svg:image xlink:href=file:///D:/circle.svg
and/or check whether you have the baseDir configured
properly for FOP, for a hint, see
  http://marc.theaimsgroup.com/?l=fop-userm=101609754702309w=2

J.Pietschmann


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




<    1   2   3   4   5   6