Discussion:
Convert existing PDF to XSL-FO tool
Ganesh
2003-09-09 11:05:16 UTC
Permalink
Hi Genies,

I would like to know if there is anyway to convert the existing PDF file
to XSL-FO file. This is basically for migrating the manual process of
creating PDF to XSL-FO way. I already have a PDF which is created
through manual process, I want to convert the same to XSL-FO and then
manipulate it later. It will be great if any of you knows such tools.

Thank you.

Regards,
Ganesh
Glen Mazza
2003-09-09 11:32:24 UTC
Permalink
Reverse compilers, for whatever languages, are quite
rare and usually buggy, wouldn't you say?
Furthermore, editing XSL FO directly is cumbersome, so
you would probably want an XML source instead that you
can run against an XSLT stylesheet to generate your
XSL FO.

It may be better to try to access the original
documents that made the PDF to begin with--Microsoft
Word, perhaps. (Or, copy and paste your PDF into text
format.) Convert--manually if need be--into XML, then
create & modify your XSLT stylesheet to generate the
output desired. If you're starting from scratch
Docbook may be the best option as an XML format for
your documents--although FOP cannot completely handle
its standard stylesheets at this time.

Glen
Post by Ganesh
Hi Genies,
I would like to know if there is anyway to convert
the existing PDF file
to XSL-FO file. This is basically for migrating the
manual process of
creating PDF to XSL-FO way. I already have a PDF
which is created
through manual process, I want to convert the same
to XSL-FO and then
manipulate it later. It will be great if any of you
knows such tools.
Thank you.
Regards,
Ganesh
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Ganesh
2003-09-09 14:25:10 UTC
Permalink
Hi,
Thank you for the reply.

I am not using XSL-FO from XSLT. I using Apache Velocity which has an
inbuilt template language (VTL) to fetch data from Java Beans on to any
text file. The dynamic data are merged with XSL-FO template using
Velocity and the resulting XSL-FO file is then given to FOP for
generating PDF.

I agree that reverse compiler are not precise, but I am a novice in
XSL-FO template creation. It would be of great help if any tool can
provide a good start on which I can build on. It would be good enough if
I could copy-paste the PDF file content onto some XSL-FO editor and it
generates the XSL-FO for me. Is anybody aware of such a XSL-FO editor?.
I heard of XMLSpy, when I searched the Google, but not sure which is
best for my requirement(ie., with existing PDF and free if possible).

Regards,
Ganesh

-----Original Message-----
From: Glen Mazza [mailto:***@yahoo.com]
Sent: Tuesday, September 09, 2003 5:02 PM
To: fop-***@xml.apache.org
Subject: Re: Convert existing PDF to XSL-FO tool


Reverse compilers, for whatever languages, are quite
rare and usually buggy, wouldn't you say?
Furthermore, editing XSL FO directly is cumbersome, so
you would probably want an XML source instead that you
can run against an XSLT stylesheet to generate your
XSL FO.

It may be better to try to access the original
documents that made the PDF to begin with--Microsoft
Word, perhaps. (Or, copy and paste your PDF into text
format.) Convert--manually if need be--into XML, then
create & modify your XSLT stylesheet to generate the
output desired. If you're starting from scratch
Docbook may be the best option as an XML format for
your documents--although FOP cannot completely handle
its standard stylesheets at this time.

Glen
Post by Ganesh
Hi Genies,
I would like to know if there is anyway to convert
the existing PDF file
to XSL-FO file. This is basically for migrating the
manual process of
creating PDF to XSL-FO way. I already have a PDF
which is created
through manual process, I want to convert the same
to XSL-FO and then
manipulate it later. It will be great if any of you
knows such tools.
Thank you.
Regards,
Ganesh
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-***@xml.apache.org
For additional commands, e-mail: fop-user-***@xml.apache.org
Andreas L. Delmelle
2003-09-09 17:30:40 UTC
Permalink
Post by Ganesh
I am not using XSL-FO from XSLT. I using Apache Velocity which has an
inbuilt template language (VTL) to fetch data from Java Beans on to any
text file. The dynamic data are merged with XSL-FO template using
Velocity and the resulting XSL-FO file is then given to FOP for
generating PDF.
Not sure what to make of this: first you don't use XSL-FO from XSLT, but you
*are* using an XSL-FO template? (Would the latter be a FO in which some sort
of a classic search-and-replace is performed? In that case, I do think
XML+XSL-FO is a more than valid alternative. Meaning: perform the merging
with Velocity in a 'template XML' that could afterwards be styled - e.g. via
Xalan - to deliver the FO)
Post by Ganesh
I agree that reverse compiler are not precise, but I am a novice in
XSL-FO template creation. It would be of great help if any tool can
provide a good start on which I can build on. It would be good enough if
I could copy-paste the PDF file content onto some XSL-FO editor and it
generates the XSL-FO for me. Is anybody aware of such a XSL-FO editor?.
I heard of XMLSpy, when I searched the Google, but not sure which is
best for my requirement(ie., with existing PDF and free if possible).
First of all, I know of no such tool ( In fact there are AFAIK no tools that
take a pdf as basis and deliver some other output-format, I guess the
process would just be too complicated ). Also, difficulties would probably
arise when a tool like this would deliver XSL-FO containing tags or
constructs not yet supported by FOP ...
Second, I think XMLSpy would not help you out here ( AFAIK they do offer an
alternative to FOP, so I cannot help but NOT recommend you this ... ;) )
And third, I really think this would not be a good way for an XSL-FO-novice
to start learning XSL-FO template creation. Start from scratch as this will
definitely learn you more about what the fo-tags do... (first-hand
experience and all that)

If you insist, however, on having someone/something else perform the pdf to
fo translation, send us a pdf and I would be more than willing to help you
on your way to make a fo for that kind of layout.

Greetz,

Andreas Delmelle
J.Pietschmann
2003-09-09 19:06:06 UTC
Permalink
Post by Ganesh
It would be of great help if any tool can
provide a good start on which I can build on.
Take a look at FOA.
Post by Ganesh
It would be good enough if
I could copy-paste the PDF file content onto some XSL-FO editor and it
generates the XSL-FO for me.
PDF is based on PostScript, in great simplification a language
which tells a printer to print stuff on certain absolute positions
on a sheet of paper. Modelling this in XSLFO is possible, using
lots of absolutely positioned block-containers, but I don't
think this is what you want.
The strength of XSLFO is that you can define blocks of content and
let the formatter take care of page and line breaking, space
justification and ultimately placing stuff on absolute positions
on a page.

J.Pietschmann
Matthias Schäfer
2003-09-10 06:27:54 UTC
Permalink
Post by Ganesh
Hi,
Thank you for the reply.
I am not using XSL-FO from XSLT. I using Apache Velocity which has an
inbuilt template language (VTL) to fetch data from Java Beans on to any
text file. The dynamic data are merged with XSL-FO template using
Velocity and the resulting XSL-FO file is then given to FOP for
generating PDF.
I agree that reverse compiler are not precise, but I am a novice in
XSL-FO template creation. It would be of great help if any tool can
provide a good start on which I can build on. It would be good enough if
I could copy-paste the PDF file content onto some XSL-FO editor and it
generates the XSL-FO for me. Is anybody aware of such a XSL-FO editor?.
Have a look on AbiWord. It could read and write *.fo and many other formats.
Post by Ganesh
I heard of XMLSpy, when I searched the Google, but not sure which is
best for my requirement(ie., with existing PDF and free if possible).
Regards,
Ganesh
-----Original Message-----
Sent: Tuesday, September 09, 2003 5:02 PM
Subject: Re: Convert existing PDF to XSL-FO tool
Reverse compilers, for whatever languages, are quite
rare and usually buggy, wouldn't you say?
Furthermore, editing XSL FO directly is cumbersome, so
you would probably want an XML source instead that you
can run against an XSLT stylesheet to generate your
XSL FO.
It may be better to try to access the original
documents that made the PDF to begin with--Microsoft
Word, perhaps. (Or, copy and paste your PDF into text
format.) Convert--manually if need be--into XML, then
create & modify your XSLT stylesheet to generate the
output desired. If you're starting from scratch
Docbook may be the best option as an XML format for
your documents--although FOP cannot completely handle
its standard stylesheets at this time.
Glen
Post by Ganesh
Hi Genies,
I would like to know if there is anyway to convert
the existing PDF file
to XSL-FO file. This is basically for migrating the
manual process of
creating PDF to XSL-FO way. I already have a PDF
which is created
through manual process, I want to convert the same
to XSL-FO and then
manipulate it later. It will be great if any of you
knows such tools.
Thank you.
Regards,
Ganesh
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
---------------------------------------------------------------------
---------------------------------------------------------------------
John Marshall
2003-09-10 07:48:02 UTC
Permalink
I am glad to see that the expert advice is *don't*. I was given the project of finding an alternative to HTML that allowed pagination and my colleagues' suggestion was to try PDF. I found that by the time a document is in PDF it is decomposed into glyphs and vectors and all of the context information has been filtered out. The answer to my problem was, of course, XSL-FO with an easy and rational path to PDF, but I do not believe there is any way back from PDF to XSL-FO that will not involve pain and heartache.

John Marshall
Accurate Software

80 Peach Street, Wokingham, Berkshire, RG40 1XH, UK.
Tel: +44 (0)118 977 3889
Fax: +44 (0)118 977 1260
http://www.accuratesoftware.com <http://www.accuratesoftware.com>




-----Original Message-----
From: Andreas L. Delmelle [mailto:***@pandora.be]
Sent: 09 September 2003 18:31
To: fop-***@xml.apache.org
Subject: RE: Convert existing PDF to XSL-FO tool
Post by Ganesh
I am not using XSL-FO from XSLT. I using Apache Velocity which has an
inbuilt template language (VTL) to fetch data from Java Beans on to any
text file. The dynamic data are merged with XSL-FO template using
Velocity and the resulting XSL-FO file is then given to FOP for
generating PDF.
Not sure what to make of this: first you don't use XSL-FO from XSLT, but you
*are* using an XSL-FO template? (Would the latter be a FO in which some sort
of a classic search-and-replace is performed? In that case, I do think
XML+XSL-FO is a more than valid alternative. Meaning: perform the merging
with Velocity in a 'template XML' that could afterwards be styled - e.g. via
Xalan - to deliver the FO)
Post by Ganesh
I agree that reverse compiler are not precise, but I am a novice in
XSL-FO template creation. It would be of great help if any tool can
provide a good start on which I can build on. It would be good enough if
I could copy-paste the PDF file content onto some XSL-FO editor and it
generates the XSL-FO for me. Is anybody aware of such a XSL-FO editor?.
I heard of XMLSpy, when I searched the Google, but not sure which is
best for my requirement(ie., with existing PDF and free if possible).
First of all, I know of no such tool ( In fact there are AFAIK no tools that
take a pdf as basis and deliver some other output-format, I guess the
process would just be too complicated ). Also, difficulties would probably
arise when a tool like this would deliver XSL-FO containing tags or
constructs not yet supported by FOP ...
Second, I think XMLSpy would not help you out here ( AFAIK they do offer an
alternative to FOP, so I cannot help but NOT recommend you this ... ;) )
And third, I really think this would not be a good way for an XSL-FO-novice
to start learning XSL-FO template creation. Start from scratch as this will
definitely learn you more about what the fo-tags do... (first-hand
experience and all that)

If you insist, however, on having someone/something else perform the pdf to
fo translation, send us a pdf and I would be more than willing to help you
on your way to make a fo for that kind of layout.

Greetz,

Andreas Delmelle


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-***@xml.apache.org
For additional commands, e-mail: fop-user-***@xml.apache.org




Accurate Software

***@accuratesoftware.com
www.accuratesoftware.com

Europe . North America . Australasia . Africa

The information in this email is confidential and privileged and is intended only for the use of the individual or entity listed above. If you are neither the intended individual, or entity listed above, nor the person responsible for the delivery of this email to the intended recipients, you are hereby notified that any unauthorised distribution, copying or use of this email is prohibited. If you have received this email in error, please notify the Accurate system manager at ***@accuratesoftware.com or on +44 (0)118 977 3889. The views expressed in this communication may not necessarily be the views held by the Accurate Group.
Ganesh
2003-09-12 09:13:21 UTC
Permalink
Please see my reply in <Ganesh> tag.

-----Original Message-----
From: Andreas L. Delmelle [mailto:***@pandora.be]
Sent: Tuesday, September 09, 2003 11:01 PM
To: fop-***@xml.apache.org
Subject: RE: Convert existing PDF to XSL-FO tool
Post by Ganesh
I am not using XSL-FO from XSLT. I using Apache Velocity which has an
inbuilt template language (VTL) to fetch data from Java Beans on to
any text file. The dynamic data are merged with XSL-FO template using
Velocity and the resulting XSL-FO file is then given to FOP for
generating PDF.
Not sure what to make of this: first you don't use XSL-FO from XSLT, but
you
*are* using an XSL-FO template? (Would the latter be a FO in which some
sort of a classic search-and-replace is performed? In that case, I do
think
XML+XSL-FO is a more than valid alternative. Meaning: perform the
XML+merging
with Velocity in a 'template XML' that could afterwards be styled - e.g.
via Xalan - to deliver the FO)

<Ganesh>

That is right, I am NOT using XSLT right now, I am using Velocity for
the typical data merge with Java beans (java beans from fed in by
another application). And Velocity is indeed very fast after caching the
velocity templates.

However I am stuck up with FOP (0.20.5) now, it takes a long time
processing the fo tables? I did the profiling and it was taking too much
of time in tables, tablerow, tablecell. Is there anyway I can optimize
this? I have around 20 tables with each 20 rows and 5 cells. Is there
any way to optimize fo tables (I do NOT have nested tables)? Is there
any alternative to fo-tables, or should I try something with fo block
and manipulate it to give look and feel of a table?

I tried to generate PDF of same size with just block text, it finished
the whole processing in half the time. Any help in this regard would be
of immense help.

</Ganesh>
Post by Ganesh
I agree that reverse compiler are not precise, but I am a novice in
XSL-FO template creation. It would be of great help if any tool can
provide a good start on which I can build on. It would be good enough
if I could copy-paste the PDF file content onto some XSL-FO editor and
it generates the XSL-FO for me. Is anybody aware of such a XSL-FO
editor?. I heard of XMLSpy, when I searched the Google, but not sure
which is best for my requirement(ie., with existing PDF and free if
possible).
First of all, I know of no such tool ( In fact there are AFAIK no tools
that take a pdf as basis and deliver some other output-format, I guess
the process would just be too complicated ). Also, difficulties would
probably arise when a tool like this would deliver XSL-FO containing
tags or constructs not yet supported by FOP ... Second, I think XMLSpy
would not help you out here ( AFAIK they do offer an alternative to FOP,
so I cannot help but NOT recommend you this ... ;) ) And third, I really
think this would not be a good way for an XSL-FO-novice to start
learning XSL-FO template creation. Start from scratch as this will
definitely learn you more about what the fo-tags do... (first-hand
experience and all that)

If you insist, however, on having someone/something else perform the pdf
to fo translation, send us a pdf and I would be more than willing to
help you on your way to make a fo for that kind of layout.

<Ganesh>
Thanks for the information. I am planning to use some authoring tool and
in the process try to learn XSL-FO and do the best possible XSL-FO with
help from you people. But I designed the whole template with fo tables
and it slows down the PDf a lot.
</Ganesh>

Greetz,

Andreas Delmelle


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-***@xml.apache.org
For additional commands, e-mail: fop-user-***@xml.apache.org




Accurate Software

***@accuratesoftware.com
www.accuratesoftware.com

Europe . North America . Australasia . Africa

The information in this email is confidential and privileged and is
intended only for the use of the individual or entity listed above. If
you are neither the intended individual, or entity listed above, nor the
person responsible for the delivery of this email to the intended
recipients, you are hereby notified that any unauthorised distribution,
copying or use of this email is prohibited. If you have received this
email in error, please notify the Accurate system manager at
***@accuratesoftware.com or on +44 (0)118 977 3889. The views
expressed in this communication may not necessarily be the views held by
the Accurate Group.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-***@xml.apache.org
For additional commands, e-mail: fop-user-***@xml.apache.org
Andreas L. Delmelle
2003-09-12 12:39:18 UTC
Permalink
Post by Ganesh
-----Original Message-----
That is right, I am NOT using XSLT right now, I am using Velocity for
the typical data merge with Java beans (java beans from fed in by
another application). And Velocity is indeed very fast after caching the
velocity templates.
However I am stuck up with FOP (0.20.5) now, it takes a long time
processing the fo tables? I did the profiling and it was taking too much
of time in tables, tablerow, tablecell. Is there anyway I can optimize
this? I have around 20 tables with each 20 rows and 5 cells. Is there
any way to optimize fo tables (I do NOT have nested tables)? Is there
any alternative to fo-tables, or should I try something with fo block
and manipulate it to give look and feel of a table?
I dunno for sure... As I understand, a table is processed from beginning to
end and kept in memory for as long as its processing is not completely
finished.
( If you were to use a layout of one table containing 400 rows, this would
diminish performance significantly... The other way round maybe? Use a
different table for each row? )
Post by Ganesh
I tried to generate PDF of same size with just block text, it finished
the whole processing in half the time. Any help in this regard would be
of immense help.
Of course, this would also depend on the content of the table-cells.
Processing text is far more straightforward than graphic data ( so, try
using the formats for which FOP has native support - reduces having to
access methods in other libraries, e.g. Batik / JAI ).
Post by Ganesh
Thanks for the information. I am planning to use some authoring tool and
in the process try to learn XSL-FO and do the best possible XSL-FO with
help from you people. But I designed the whole template with fo tables
and it slows down the PDf a lot.
Also, for an example of a GUI app in which you can design documents visually
and save it in fo format, try Inventive Designers' Scriptura

http://www.inventivedesigners.com/

I admit, it's distgustingly expensive, but the demo allows you to save in
fo-format 5 times or so... Should get you going. ( hope you have a
high-speed connection, though )

Greetz,

Andreas Delmelle
J.Pietschmann
2003-09-12 18:35:29 UTC
Permalink
Post by Andreas L. Delmelle
I dunno for sure... As I understand, a table is processed from beginning to
end and kept in memory for as long as its processing is not completely
finished.
Actually, it is worse.

J.Pietschmann

Savino, Matt C
2003-09-12 18:10:03 UTC
Permalink
We started using FOP based on the same requirements and have been thrilled with the results. If you can get from XSL-FO to PDF, I'm not sure why you might need a path *back*. If you are looking to create the PDF through something like Acrobat Exchange, then spit out the xsl:fo, you may be in trouble. But if you're willing to sit down and learn xsl:fo, IMO FOP makes a nice, powerful, free solution.

Although I have heard of XSL:FO WSYWIG editors in the works. Any updates?

-Matt
Post by Ganesh
-----Original Message-----
Sent: Wednesday, September 10, 2003 12:48 AM
Subject: RE: Convert existing PDF to XSL-FO tool
I am glad to see that the expert advice is *don't*. I was
given the project of finding an alternative to HTML that
allowed pagination and my colleagues' suggestion was to try
PDF. I found that by the time a document is in PDF it is
decomposed into glyphs and vectors and all of the context
information has been filtered out. The answer to my problem
was, of course, XSL-FO with an easy and rational path to PDF,
but I do not believe there is any way back from PDF to XSL-FO
that will not involve pain and heartache.
John Marshall
Accurate Software
80 Peach Street, Wokingham, Berkshire, RG40 1XH, UK.
Tel: +44 (0)118 977 3889
Fax: +44 (0)118 977 1260
http://www.accuratesoftware.com <http://www.accuratesoftware.com>
-----Original Message-----
Sent: 09 September 2003 18:31
Subject: RE: Convert existing PDF to XSL-FO tool
Post by Ganesh
I am not using XSL-FO from XSLT. I using Apache Velocity
which has an
Post by Ganesh
inbuilt template language (VTL) to fetch data from Java
Beans on to any
Post by Ganesh
text file. The dynamic data are merged with XSL-FO template using
Velocity and the resulting XSL-FO file is then given to FOP for
generating PDF.
Not sure what to make of this: first you don't use XSL-FO
from XSLT, but you
*are* using an XSL-FO template? (Would the latter be a FO in
which some sort
of a classic search-and-replace is performed? In that case, I do think
XML+XSL-FO is a more than valid alternative. Meaning: perform
the merging
with Velocity in a 'template XML' that could afterwards be
styled - e.g. via
Xalan - to deliver the FO)
Post by Ganesh
I agree that reverse compiler are not precise, but I am a novice in
XSL-FO template creation. It would be of great help if any tool can
provide a good start on which I can build on. It would be
good enough if
Post by Ganesh
I could copy-paste the PDF file content onto some XSL-FO
editor and it
Post by Ganesh
generates the XSL-FO for me. Is anybody aware of such a
XSL-FO editor?.
Post by Ganesh
I heard of XMLSpy, when I searched the Google, but not sure which is
best for my requirement(ie., with existing PDF and free if
possible).
First of all, I know of no such tool ( In fact there are
AFAIK no tools that
take a pdf as basis and deliver some other output-format, I guess the
process would just be too complicated ). Also, difficulties
would probably
arise when a tool like this would deliver XSL-FO containing tags or
constructs not yet supported by FOP ...
Second, I think XMLSpy would not help you out here ( AFAIK
they do offer an
alternative to FOP, so I cannot help but NOT recommend you
this ... ;) )
And third, I really think this would not be a good way for an
XSL-FO-novice
to start learning XSL-FO template creation. Start from
scratch as this will
definitely learn you more about what the fo-tags do... (first-hand
experience and all that)
If you insist, however, on having someone/something else
perform the pdf to
fo translation, send us a pdf and I would be more than
willing to help you
on your way to make a fo for that kind of layout.
Greetz,
Andreas Delmelle
---------------------------------------------------------------------
Accurate Software
www.accuratesoftware.com
Europe . North America . Australasia . Africa
The information in this email is confidential and privileged
and is intended only for the use of the individual or entity
listed above. If you are neither the intended individual, or
entity listed above, nor the person responsible for the
delivery of this email to the intended recipients, you are
hereby notified that any unauthorised distribution, copying
or use of this email is prohibited. If you have received this
email in error, please notify the Accurate system manager at
The views expressed in this communication may not necessarily
be the views held by the Accurate Group.
---------------------------------------------------------------------
Loading...