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 Michael Welter <mi...@introspect.com> on 2002/09/04 19:40:34 UTC
pdf/ps
Does anyone know of a utility which translates a PDF or PS file to
XSL-FO? I have a bunch of government PDF forms that I would like to
generate from FOP.
Thanks,
Mike
Re: pdf/ps
Posted by Antonio Fiol Bonnín <fi...@terra.es>.
>
>
>> Maybe I am taking this a little bit off-topic, but you say...
>>
>> "instructions to place strings and lines and other stuff
>> here and there"
>>
>> This ressembles to me a bit like SVG, don't you think?
>
>
> Well, close...
> There are problems though, like embedded fonts.
Well, I had not thought of those. But if you have a Java PS/PDF viewer
that can render it, can't you use Batik to get an SVG file? I mean, I am
not sure whether PS interpreters actually "load" the embedded font and
then render texts (in which case it would not work) or they translate
the font to lines and arcs and so on (which would be correctly
translated into [bloated] SVG by batik).
However, if I understood well what is needed, I have just found a free
product that might do the job: Etymon PJ. It allows you to stamp text on
a PDF page which IIRC is what the person who asked wanted to do. I do
not know whether it allows to "merge" two PDF pages, but it is quite
likely, seen the features it has.
http://www.etymon.com/pjc/
HTH more than previous one.
Antonio Fiol
Re: pdf/ps
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Antonio Fiol Bonnín wrote:
> Maybe I am taking this a little bit off-topic, but you say...
>
> "instructions to place strings and lines and other stuff
> here and there"
>
> This ressembles to me a bit like SVG, don't you think?
Well, close...
There are problems though, like embedded fonts.
J.Pietschmann
Re: pdf/ps
Posted by Antonio Fiol Bonnín <fi...@terra.es>.
Maybe I am taking this a little bit off-topic, but you say...
"instructions to place strings and lines and other stuff
here and there"
This ressembles to me a bit like SVG, don't you think?
So maybe it is not easy to build a tool that transforms PS to XSL-FO,
but it does not seem very difficult to get an SVG writer.
I will even give Mr. Welter some free advice on how to do that: ;-)
1. Find a Java PS or PDF AWT renderer (there must exist one).
2. Download batik.
3. Create a simple that uses batik's SVG renderer as the AWT canvas to
render the PS into.
And "voila!".
HTH.
Antonio Fiol
J.Pietschmann wrote:
> Michael Welter wrote:
>
>> Does anyone know of a utility which translates a PDF or PS file to
>> XSL-FO? I have a bunch of government PDF forms that I would like to
>> generate from FOP.
>
>
> Well, uncompressed PDF and PS can be viewed at with an
> arbitrary text editor, try it.
> There is basically no higher level structure, just
> instructions to place strings and lines and other stuff
> here and there. It is very hard to derive the structure
> needed for building FOs from arbitrary PDF or PS.
> Your best bet is probably to print the forms, take a
> ruler and use the measurements to construct a FO file
> with some tables or absolutely positioned block-containers.
> The docs/examples directories have some examples of exactly
> this.
>
> J.Pietschmann
>
>
>
Re: pdf/ps
Posted by "J.Pietschmann" <j3...@yahoo.de>.
Michael Welter wrote:
> Does anyone know of a utility which translates a PDF or PS file to
> XSL-FO? I have a bunch of government PDF forms that I would like to
> generate from FOP.
Well, uncompressed PDF and PS can be viewed at with an
arbitrary text editor, try it.
There is basically no higher level structure, just
instructions to place strings and lines and other stuff
here and there. It is very hard to derive the structure
needed for building FOs from arbitrary PDF or PS.
Your best bet is probably to print the forms, take a
ruler and use the measurements to construct a FO file
with some tables or absolutely positioned block-containers.
The docs/examples directories have some examples of exactly
this.
J.Pietschmann