You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Daniel Carrera <da...@zmsl.com> on 2006/08/27 13:43:00 UTC

Does FOP compile on GCJ?

Greetings all,

I have a question not in the FAQ which I hope is simple: Does FOP
compile with GCJ?

The objective here is to be able to distribute pre-compiled binaries for
Linux without worrying about whether the user has Java installed.

More details: I'm doing a feasibility study on a program to convert
OpenDocument files into PDF. One possible avenue is to convert
OpenDocument into XSL-FO and pass the result to FOP to generate the PDF.
But I wish to avoid a Java dependency for practical reasons.

Any information would be greatly appreciated.

Cheers,
Daniel.
-- 
"I AM in shape. Round IS a shape."


Re: Does FOP compile on GCJ?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 27.08.2006 18:04:38 Daniel Carrera wrote:
> Ok. Thanks for the information though. It really helped a lot.

You're welcome.

> The goal for today was just an initial feasibility study. And the
> project looks feasible :) Before today we weren't sure that the project
> was even feasible.

Uhm, we only discussed a few aspects. Whether ODF can be mapped to
XSL-FO satisfyingly is probably a central point and not to be
underestimated. With our RTF output support we've seen that it may be
quite difficult to map all the XSL-FO features to RTF. The other way
(ODF to FO) might also have its issues.

Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Does FOP compile on GCJ?

Posted by Daniel Carrera <da...@zmsl.com>.
Ok. Thanks for the information though. It really helped a lot.

The goal for today was just an initial feasibility study. And the
project looks feasible :) Before today we weren't sure that the project
was even feasible.

Cheers,
Daniel.


On Sun, 2006-27-08 at 17:56 +0200, Jeremias Maerki wrote:
> Implementing the infrastructure for the FOP extension is easy. There are
> existing ones that you can adapt (<0.5d). The thing that'll take more
> work is actually converting the dr3d:scene (internally represented as a
> DOM) to a bitmap (or whatever). That's not an estimation I can do right
> now.
> 
> On 27.08.2006 17:51:39 Daniel Carrera wrote:
> > On Sun, 2006-27-08 at 17:39 +0200, Jeremias Maerki wrote:
> > > If you write an extension for FOP that can deal with dr3d:scene you
> > > could simply map that into a fo:instream-foreign-object.
> > 
> > That's a great idea. I didn't realize that was possible :)  I can't do
> > the work myself, but I can add the cost of hiring someone to do this to
> > the proposal. Do you think this is a feasible task? Can you give me a
> > rough, ball-park estimate of how much work this would be? (e.g. 1
> > man-month).
> 
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
-- 
"I AM in shape. Round IS a shape."

Re: Does FOP compile on GCJ?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Implementing the infrastructure for the FOP extension is easy. There are
existing ones that you can adapt (<0.5d). The thing that'll take more
work is actually converting the dr3d:scene (internally represented as a
DOM) to a bitmap (or whatever). That's not an estimation I can do right
now.

On 27.08.2006 17:51:39 Daniel Carrera wrote:
> On Sun, 2006-27-08 at 17:39 +0200, Jeremias Maerki wrote:
> > If you write an extension for FOP that can deal with dr3d:scene you
> > could simply map that into a fo:instream-foreign-object.
> 
> That's a great idea. I didn't realize that was possible :)  I can't do
> the work myself, but I can add the cost of hiring someone to do this to
> the proposal. Do you think this is a feasible task? Can you give me a
> rough, ball-park estimate of how much work this would be? (e.g. 1
> man-month).



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Does FOP compile on GCJ?

Posted by Daniel Carrera <da...@zmsl.com>.
On Sun, 2006-27-08 at 17:39 +0200, Jeremias Maerki wrote:
> If you write an extension for FOP that can deal with dr3d:scene you
> could simply map that into a fo:instream-foreign-object.

That's a great idea. I didn't realize that was possible :)  I can't do
the work myself, but I can add the cost of hiring someone to do this to
the proposal. Do you think this is a feasible task? Can you give me a
rough, ball-park estimate of how much work this would be? (e.g. 1
man-month).

Cheers,
Daniel.
-- 
"I AM in shape. Round IS a shape."

Re: Does FOP compile on GCJ?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 27.08.2006 17:27:15 Daniel Carrera wrote:
<snip/>
> I've been looking at the ODF->XSL-FO side of the project. It looks like
> while most of the work would be straight forward, we may hit a snag with
> 3D shapes, as those are not supported in XSL-FO+SVG. This isn't
> necessarily a deal-breaker, I'll just have to compare it with the
> probable snags with the competing proposal (which is to take KOffice and
> rip out the bits we need).

If you write an extension for FOP that can deal with dr3d:scene you
could simply map that into a fo:instream-foreign-object.

<snip/>


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Does FOP compile on GCJ?

Posted by Daniel Carrera <da...@zmsl.com>.
On Sun, 2006-27-08 at 15:39 +0200, Jeremias Maerki wrote:
> Well, given the recently changed license terms of the Sun JVM, I'd even
> consider bundling that one even though it's not open source.

Ok. I'm not familiar with the new terms. I'll try to learn about them.
Since this isn't a project we'd start soon, and there's talk about Sun
making Java open source (CDDL I expect), the issue might become moot.

I've been looking at the ODF->XSL-FO side of the project. It looks like
while most of the work would be straight forward, we may hit a snag with
3D shapes, as those are not supported in XSL-FO+SVG. This isn't
necessarily a deal-breaker, I'll just have to compare it with the
probable snags with the competing proposal (which is to take KOffice and
rip out the bits we need).


> > > Ah, PDF/A, very good. :-)
> > 
> > Oh, one question I should have asked is if FOP can produce PDF/A, or
> > could be reasonably enhanced to do so.
> 
> The latest code can: http://xmlgraphics.apache.org/fop/trunk/pdfa.html

Thanks! That looks great, really promising. It doesn't matter that it's
new code. By the time we start an odf2pdf project (knock on wood) it'll
be early-to-mid 2007.

Cheers,
Daniel.
-- 
"I AM in shape. Round IS a shape."

Re: Does FOP compile on GCJ?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 27.08.2006 15:13:24 Daniel Carrera wrote:
> On Sun, 2006-27-08 at 15:02 +0200, Jeremias Maerki wrote:
> > > Thank you for the info. That was very informative. I have some
> > > additional questions:
> > 
> > Actually, I don't find any questions below.
> 
> Yeah... after I hit "send" I realized I should have said "comments".
> 
> Ok, I have a question now :)  Is there a reasonably light-weight JVM
> that is open source, and will run FOP?  Maybe we can ship both FOP and
> the JVM together and forget about compiling. As long as that doesn't
> make the download size shoot through the roof.

Well, given the recently changed license terms of the Sun JVM, I'd even
consider bundling that one even though it's not open source. That would
give you the least of all problems. If it's light-weight, that's a
matter of taste, I think. More info:
http://www.java.com/en/download/help/5000055100.xml

Otherwise, take a look here: http://www.gnu.org/software/classpath/stories.html#jvm
I think Kaffe and SableVM are the most popular choices. But since they
are all based on GNU Classpath, there's a good chance that you run into
exceptions due to the buggy XML processing.

To my knowledge, nobody has tried to run FOP under Harmony so far. I'm
not sure if Harmony's class library already supports everything that FOP
needs. Looking here, I think that JAXP and ImageIO are blockers ATM:
http://incubator.apache.org/harmony/subcomponents/classlibrary/status.html

> 
> I would consider Mono if it was already a standard Linux component, but
> sadly it isn't yet... so you're right, I might as well use a JVM.
> 
> > Ah, PDF/A, very good. :-)
> 
> Oh, one question I should have asked is if FOP can produce PDF/A, or
> could be reasonably enhanced to do so.

The latest code can: http://xmlgraphics.apache.org/fop/trunk/pdfa.html
This will be in FOP 0.93. 0.92beta has some of it already but there have
been a lot of fixes since then. But there could still be some issues. I
know for a fact that Apago's PDFAppraiser isn't completely happy with
FOP's PDFs but due to a lack of a full license I don't get the details.
Feedback welcome.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Does FOP compile on GCJ?

Posted by Daniel Carrera <da...@zmsl.com>.
On Sun, 2006-27-08 at 15:02 +0200, Jeremias Maerki wrote:
> > Thank you for the info. That was very informative. I have some
> > additional questions:
> 
> Actually, I don't find any questions below.

Yeah... after I hit "send" I realized I should have said "comments".

Ok, I have a question now :)  Is there a reasonably light-weight JVM
that is open source, and will run FOP?  Maybe we can ship both FOP and
the JVM together and forget about compiling. As long as that doesn't
make the download size shoot through the roof.

I would consider Mono if it was already a standard Linux component, but
sadly it isn't yet... so you're right, I might as well use a JVM.

> Ah, PDF/A, very good. :-)

Oh, one question I should have asked is if FOP can produce PDF/A, or
could be reasonably enhanced to do so.

Cheers,
Daniel.
-- 
"I AM in shape. Round IS a shape."

Re: Does FOP compile on GCJ?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 27.08.2006 14:37:17 Daniel Carrera wrote:
> Hi Jeremias,
> 
> Thank you for the info. That was very informative. I have some
> additional questions:

Actually, I don't find any questions below.

> > So far, I'm able to
> > manually create a stand-alone EXE which is basically the FOP
> > command-line without SVG support. But it only works if I replace GNU
> > Classpath's JAXP implementation with Xerces-J and Xalan-J
> [snip]
> 
> I don't have my heart set on GNU Classpath. My goal is a stand-alone
> executable that is easy to distribute (which includes not requiring Java
> installed). Besides that, I don't really care what it's compiled with.

If you go the Java way, there's probably no way around GNU Classpath. I
don't think it's Harmony's goal to write a native compiler. They just
want to do a VM. IKVM doesn't help either, since you'd still need a
.NET-environment (Mono on Unix) and that means you could just as well
use a JVM.

> I notice that you're not a fan of Unix :(  One of the project criteria
> is Unix support. Indeed, Unix is "required" and Windows support is "nice
> to have".

Actually, I'm a fan of Unix as long as we're talking headless servers
with a Sun JVM installed and as long as I don't have to start compiling
C/C++ code (which I have to do when I get serious with GNU Classpath).
And when you start thinking about Windows and GCJ/GNU Classpath it gets
even worse. But yeah, so far I'm less disappointed of Windows than I am
of Linux GUIs. MacOSX? May be an option at some point. But let's put
religion aside. ;-)

> As for contributing, there _is_ a chance that we might fund FOP
> development to get bits and pieces we want done. But I wish to be clear
> that right now I'm just doing a "feasibility study". I'm looking for the
> best way to make a light-weight, stand-alone converter. Once I have
> that, we (the OpenDocument Fellowship) try to get a donor to fund the
> project. This isn't impossible, we've already had 3 medium-sized
> projects funded (odf2pdf would count as a "large" project). I just want
> to be clear... while I'm not just asking idle questions, I am light
> years from being able to promise anything.

But that already sounds promising. I guess if I had a real need to
compile/run FOP with GCJ (or IKVM) I'd put more energy into it. So far,
I've just tried to help making FOP and Batik more universally usable
given the various requests I got so far. I'd assume that most of the
work needs to be done outside of FOP and in documentation. I've been
very careful to avoid and fix any issues that might result in problems
when running FOP in alternative environments.

> > If you want to convert ODF to PDF, isn't it much easier to just
> > use OpenOffice for that? I would assume that you can do that
> > programmatically through the Uno infrastructure.
> 
> If it was just me who wanted to convert for my own purposes, yes, that's
> what I would do. There is even a command-line tool that lets you
> automate this. But what we want is to make a light-weight tool that
> other developers or admins can deploy easily. In addition, we're
> interested in one that can output PDF/A files, and OOo doesn't do that.

Ah, PDF/A, very good. :-)


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Does FOP compile on GCJ?

Posted by Daniel Carrera <da...@zmsl.com>.
Hi Jeremias,

Thank you for the info. That was very informative. I have some
additional questions:

> So far, I'm able to
> manually create a stand-alone EXE which is basically the FOP
> command-line without SVG support. But it only works if I replace GNU
> Classpath's JAXP implementation with Xerces-J and Xalan-J
[snip]

I don't have my heart set on GNU Classpath. My goal is a stand-alone
executable that is easy to distribute (which includes not requiring Java
installed). Besides that, I don't really care what it's compiled with.

I notice that you're not a fan of Unix :(  One of the project criteria
is Unix support. Indeed, Unix is "required" and Windows support is "nice
to have".

As for contributing, there _is_ a chance that we might fund FOP
development to get bits and pieces we want done. But I wish to be clear
that right now I'm just doing a "feasibility study". I'm looking for the
best way to make a light-weight, stand-alone converter. Once I have
that, we (the OpenDocument Fellowship) try to get a donor to fund the
project. This isn't impossible, we've already had 3 medium-sized
projects funded (odf2pdf would count as a "large" project). I just want
to be clear... while I'm not just asking idle questions, I am light
years from being able to promise anything.

> If you want to convert ODF to PDF, isn't it much easier to just
> use OpenOffice for that? I would assume that you can do that
> programmatically through the Uno infrastructure.

If it was just me who wanted to convert for my own purposes, yes, that's
what I would do. There is even a command-line tool that lets you
automate this. But what we want is to make a light-weight tool that
other developers or admins can deploy easily. In addition, we're
interested in one that can output PDF/A files, and OOo doesn't do that.

Thanks for the help!

> > "I AM in shape. Round IS a shape."
> 
> Hehe, that's an interesting approach to deal with a bad conscience,
> although probably not a healthy one. :-)

:-)

Cheers,
Daniel.
-- 
"I AM in shape. Round IS a shape."

Re: Does FOP compile on GCJ?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Almost forgot: You can work with Matthew Burgess on that. He's recording
his stuff here: http://issues.apache.org/bugzilla/show_bug.cgi?id=39927

On 27.08.2006 14:06:45 Jeremias Maerki wrote:
> GCJ support is currently not an official goal of Apache FOP. We've
> recently fixed a number of things to make XML Graphics (Batik and FOP,
> plus Commons) more compatible with GNU Classpath. As a personal
> side-project I'm (slowly) working towards compiling FOP for the .NET
> platform with IKVM (which also uses GNU Classpath). So far, I'm able to
> manually create a stand-alone EXE which is basically the FOP
> command-line without SVG support. But it only works if I replace GNU
> Classpath's JAXP implementation with Xerces-J and Xalan-J because the
> GNU Classpath stuff is still highly buggy althought a few things have
> already been fixed. Frankly, I don't understand why they insist on
> having their own implementation. The ASF considers the ALv2 to be
> compatible with the GPL, although the FSF doesn't really see it that way,
> unfortunately. The other way around is clearly off-limits, of course,
> but the GPLv3 may help here later.
> 
> I've made my experiments with GCJ but they were highly frustrating. Not
> because of FOP, but because of GNU Classpath (mainly the JAXP part).
> Other people (from Fedora core, Debian and Wikipedia) are also
> interested in this but so far nobody has really put much energy into
> this. I guess everyone still looks in my direction, but I don't have
> much patience with Unix, the GPL and GNU Classpath. Once Harmony has
> evolved I little further, I will probably more look in that direction,
> especially now that Java2D support takes shape there.
> 
> I've started some documentation on the topic:
> http://wiki.apache.org/xmlgraphics/GnuClasspathCompatibility
> 
> You're invited to work with us on this. I'd appreciate if you could add
> any findings on the Wiki page above (or add a new one for HowTos and
> stuff). I'm gladly reviewing and adding any patches for FOP if you
> decide to jump in.
> 
> If you want to convert ODF to PDF, isn't it much easier to just
> use OpenOffice for that? I would assume that you can do that
> programmatically through the Uno infrastructure.
> 
> On 27.08.2006 13:43:00 Daniel Carrera wrote:
> > Greetings all,
> > 
> > I have a question not in the FAQ which I hope is simple: Does FOP
> > compile with GCJ?
> > 
> > The objective here is to be able to distribute pre-compiled binaries for
> > Linux without worrying about whether the user has Java installed.
> > 
> > More details: I'm doing a feasibility study on a program to convert
> > OpenDocument files into PDF. One possible avenue is to convert
> > OpenDocument into XSL-FO and pass the result to FOP to generate the PDF.
> > But I wish to avoid a Java dependency for practical reasons.
> > 
> > Any information would be greatly appreciated.
> > 
> > Cheers,
> > Daniel.
> > -- 
> > "I AM in shape. Round IS a shape."
> 
> Hehe, that's an interesting approach to deal with a bad conscience,
> although probably not a healthy one. :-)



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Does FOP compile on GCJ?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
GCJ support is currently not an official goal of Apache FOP. We've
recently fixed a number of things to make XML Graphics (Batik and FOP,
plus Commons) more compatible with GNU Classpath. As a personal
side-project I'm (slowly) working towards compiling FOP for the .NET
platform with IKVM (which also uses GNU Classpath). So far, I'm able to
manually create a stand-alone EXE which is basically the FOP
command-line without SVG support. But it only works if I replace GNU
Classpath's JAXP implementation with Xerces-J and Xalan-J because the
GNU Classpath stuff is still highly buggy althought a few things have
already been fixed. Frankly, I don't understand why they insist on
having their own implementation. The ASF considers the ALv2 to be
compatible with the GPL, although the FSF doesn't really see it that way,
unfortunately. The other way around is clearly off-limits, of course,
but the GPLv3 may help here later.

I've made my experiments with GCJ but they were highly frustrating. Not
because of FOP, but because of GNU Classpath (mainly the JAXP part).
Other people (from Fedora core, Debian and Wikipedia) are also
interested in this but so far nobody has really put much energy into
this. I guess everyone still looks in my direction, but I don't have
much patience with Unix, the GPL and GNU Classpath. Once Harmony has
evolved I little further, I will probably more look in that direction,
especially now that Java2D support takes shape there.

I've started some documentation on the topic:
http://wiki.apache.org/xmlgraphics/GnuClasspathCompatibility

You're invited to work with us on this. I'd appreciate if you could add
any findings on the Wiki page above (or add a new one for HowTos and
stuff). I'm gladly reviewing and adding any patches for FOP if you
decide to jump in.

If you want to convert ODF to PDF, isn't it much easier to just
use OpenOffice for that? I would assume that you can do that
programmatically through the Uno infrastructure.

On 27.08.2006 13:43:00 Daniel Carrera wrote:
> Greetings all,
> 
> I have a question not in the FAQ which I hope is simple: Does FOP
> compile with GCJ?
> 
> The objective here is to be able to distribute pre-compiled binaries for
> Linux without worrying about whether the user has Java installed.
> 
> More details: I'm doing a feasibility study on a program to convert
> OpenDocument files into PDF. One possible avenue is to convert
> OpenDocument into XSL-FO and pass the result to FOP to generate the PDF.
> But I wish to avoid a Java dependency for practical reasons.
> 
> Any information would be greatly appreciated.
> 
> Cheers,
> Daniel.
> -- 
> "I AM in shape. Round IS a shape."

Hehe, that's an interesting approach to deal with a bad conscience,
although probably not a healthy one. :-)



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org