You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Peter Murray-Rust <Pe...@nottingham.ac.uk> on 2000/05/12 10:34:11 UTC
Newbie questions
I have recently become a user of FOP [and possibly might wish to do some
small development in the future if appropriate - see below]. I have a
number of questions which I have been unable to answer from FOP-DEV
archives, the FAQ and the distribution. I am sorry that they are rather
elementary; perhaps they are useful FAQs?.
At present I am interested in XHTML(+FooML)->FO->PDF - FooML mainly
represents CML (chemistry) at present but illustrates general
technical/scientific publication. My current documents are rendered using
CSS for the XHTML and Foo2SVG.xsl with <embed> for the resultant SVG. I
would like to be able to keep the screen and PDF rendering in parallel as
far as possible.
1. Has anyone prototyped an XHTML2FO.xsl? [I hacked a very simple one based
on the examples in the FOP distribution]. If so, is it possible to minimise
the maintenance of the *.fo and *.css [i.e. to ensure that changes to the
formatting/styling are then translated to both screen and paper?].
2. Am I right that I need <fo:inline> to change text style/fonts, etc
without line breaks (as in "bar is <em>not</em> foo"). If so, is there a
current *.jar that implements this?
3. Is there a mechanism for managing images (e.g. can I translate <img
src="foo.gif"/> to FO?).
4. I have browsed the current CVS repository but am unclear whether it
contains a "latest *.jar" or whether I need to download the latest *.java
and compile. If so, do I need CVS installed?
5. Are there any examples of how images and SVG are included in a *.FO?
[The XSL spec suggests fo:instream-foreign-object, but gives few details -
is the type determined by MIME or by XML namespaces or some other mechanism.]
I am excited by the progress that you have made and see FOP as a key tool
in the success of XML. In technical disciplines it will provide an
application-independent high-quality "Print" button that should mean that
implementers of new FooML should not have to worry much about printing. At
present I do not know enough about FOP to determine whether it is best to
go through SVG and use the generic FOP-SVG mechanism or whether it is a
good idea to write a specific formatter for (say) CML within the FOP family.
Peter
Re: Newbie questions
Posted by Peter Murray-Rust <Pe...@nottingham.ac.uk>.
At 06:45 12/05/00 -0300, Arved Sandstrom wrote:
Many thanks for the prompt response.
>At 09:34 AM 5/12/00 +0100, Peter Murray-Rust wrote:
> >
> >1. Has anyone prototyped an XHTML2FO.xsl? [I hacked a very simple one based
> >on the examples in the FOP distribution]. If so, is it possible to minimise
> >the maintenance of the *.fo and *.css [i.e. to ensure that changes to the
> >formatting/styling are then translated to both screen and paper?].
>
>Not to my knowledge, to answer the first question, save yourself.
I'll be happy to contribute it as an example when I have done a bit more.
> >2. Am I right that I need <fo:inline> to change text style/fonts, etc
> >without line breaks (as in "bar is <em>not</em> foo"). If so, is there a
> >current *.jar that implements this?
>
> >3. Is there a mechanism for managing images (e.g. can I translate <img
> >src="foo.gif"/> to FO?).
>
> >4. I have browsed the current CVS repository but am unclear whether it
> >contains a "latest *.jar" or whether I need to download the latest *.java
> >and compile. If so, do I need CVS installed?
>
>To sort of answer questions 2-4:
>
>Over the past month or so we have regrouped and reorganized. We intend to
>deliver an interim release (*.jar) in 10 days.
Excellent
>Our primary goal is to
>deliver (now that it looks like XSL FO is settled down) a FOP which conforms
>to the XSL spec at the Basic conformance level (minimum) rapidly
>(realistically, a few months).
>
>Getting FO's like <fo:inline> incorporated and working is included in this
>effort. Image support is also being aggressively revamped. I expect that
>other FOP developers will have more to add on image support, though.
>
>The best bet at any time (but right now, in particular) to get latest
>sources is to use CVS to get the latest sources. I develop on Linux, but I
>have WinCVS set up so that I can test on Win98. For that I use anonymous
>CVS. It was exceptionally easy to install and set up WinCVS, so there is
>very little overhead to doing this. On other platforms (Linux and Mac) it is
>also as easy ('cvs' on UNIX, and MacCVS for MacOS).
Thanks
> >I am excited by the progress that you have made and see FOP as a key tool
> >in the success of XML. In technical disciplines it will provide an
> >application-independent high-quality "Print" button that should mean that
> >implementers of new FooML should not have to worry much about printing. At
> >present I do not know enough about FOP to determine whether it is best to
> >go through SVG and use the generic FOP-SVG mechanism or whether it is a
> >good idea to write a specific formatter for (say) CML within the FOP
> family.
> >
>James Tauber put great work (design and code) into FOP. It's the youngest
>member of Apache XML (I think), so after an initial teething period I think
>we have organizational things worked out and can now concentrate on design
>and code to get FOP up to speed with the spec.
>
>Personally (and this all credited to James)
Of course - I know James.
>I am particularly pleased with
>the clean separation of formatting from rendering. New renderers can be
>developed and dropped in fairly easily. As a matter of fact, FOP includes an
>AWTViewer renderer which was dropped in, in just this manner, and was
>originally developed outside FOP.
This is a particularly exciting tool. It is very attractive for some of the
applications we need in technical subjects where we wish to layout areas on
the screen for interactive work. Precision of text rendering is probably
not critical (Swing used to be problematic here - I don't know if it's
improved lately). But having specialist areas is exactly what we need.
many thanks
P.
>Arved Sandstrom
Re: Newbie questions
Posted by Arved Sandstrom <Ar...@chebucto.ns.ca>.
At 09:34 AM 5/12/00 +0100, Peter Murray-Rust wrote:
>I have recently become a user of FOP [and possibly might wish to do some
>small development in the future if appropriate - see below]. I have a
>number of questions which I have been unable to answer from FOP-DEV
>archives, the FAQ and the distribution. I am sorry that they are rather
>elementary; perhaps they are useful FAQs?.
We're always on the lookout for questions that ought to be FAQs. Thanks.
>At present I am interested in XHTML(+FooML)->FO->PDF - FooML mainly
>represents CML (chemistry) at present but illustrates general
>technical/scientific publication. My current documents are rendered using
>CSS for the XHTML and Foo2SVG.xsl with <embed> for the resultant SVG. I
>would like to be able to keep the screen and PDF rendering in parallel as
>far as possible.
>
>1. Has anyone prototyped an XHTML2FO.xsl? [I hacked a very simple one based
>on the examples in the FOP distribution]. If so, is it possible to minimise
>the maintenance of the *.fo and *.css [i.e. to ensure that changes to the
>formatting/styling are then translated to both screen and paper?].
Not to my knowledge, to answer the first question, save yourself.
>2. Am I right that I need <fo:inline> to change text style/fonts, etc
>without line breaks (as in "bar is <em>not</em> foo"). If so, is there a
>current *.jar that implements this?
>3. Is there a mechanism for managing images (e.g. can I translate <img
>src="foo.gif"/> to FO?).
>4. I have browsed the current CVS repository but am unclear whether it
>contains a "latest *.jar" or whether I need to download the latest *.java
>and compile. If so, do I need CVS installed?
To sort of answer questions 2-4:
Over the past month or so we have regrouped and reorganized. We intend to
deliver an interim release (*.jar) in 10 days. Our primary goal is to
deliver (now that it looks like XSL FO is settled down) a FOP which conforms
to the XSL spec at the Basic conformance level (minimum) rapidly
(realistically, a few months).
Getting FO's like <fo:inline> incorporated and working is included in this
effort. Image support is also being aggressively revamped. I expect that
other FOP developers will have more to add on image support, though.
The best bet at any time (but right now, in particular) to get latest
sources is to use CVS to get the latest sources. I develop on Linux, but I
have WinCVS set up so that I can test on Win98. For that I use anonymous
CVS. It was exceptionally easy to install and set up WinCVS, so there is
very little overhead to doing this. On other platforms (Linux and Mac) it is
also as easy ('cvs' on UNIX, and MacCVS for MacOS).
>5. Are there any examples of how images and SVG are included in a *.FO?
>[The XSL spec suggests fo:instream-foreign-object, but gives few details -
>is the type determined by MIME or by XML namespaces or some other mechanism.]
How images are to be done has been evolving about as rapidly as anything in
the spec, so things are up in the air at the moment, to some extent. When we
issue our 1.0 release in a few months (estimate), and images work properly,
SVG would be handled with <fo:instream-foreign-object>, and bitmaps etc with
<fo:external-graphic>, typically.
Again, we have a number of developers who are aggressively working on image
support. I would expect that if you have CVS that you will have adequate
image support rather sooner than later, well before the 1.0 release. But
we'll both have to wait and hear their comments. :-)
>I am excited by the progress that you have made and see FOP as a key tool
>in the success of XML. In technical disciplines it will provide an
>application-independent high-quality "Print" button that should mean that
>implementers of new FooML should not have to worry much about printing. At
>present I do not know enough about FOP to determine whether it is best to
>go through SVG and use the generic FOP-SVG mechanism or whether it is a
>good idea to write a specific formatter for (say) CML within the FOP family.
>
James Tauber put great work (design and code) into FOP. It's the youngest
member of Apache XML (I think), so after an initial teething period I think
we have organizational things worked out and can now concentrate on design
and code to get FOP up to speed with the spec.
Personally (and this all credited to James) I am particularly pleased with
the clean separation of formatting from rendering. New renderers can be
developed and dropped in fairly easily. As a matter of fact, FOP includes an
AWTViewer renderer which was dropped in, in just this manner, and was
originally developed outside FOP.
Arved Sandstrom