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 Dola Woolfe <do...@yahoo.com> on 2009/09/04 02:02:50 UTC
Newbie question
I did my homework, but this does not appear to be an FAQ!
How does FOP read PDF's?
Many thanks in advance,
Dola
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Newbie question
Posted by "J.Pietschmann" <j3...@yahoo.de>.
On 04.09.2009 15:22, Dola Woolfe wrote:
> (Sounds like more than the 1 hour I was allocating for it.)
PDF as a format isn't meant to be parsed for advanced text processing,
it was designed for presentation. PDF generators could make your job
of parsing text out of the file arbitrarily hard. As an extreme (and
rather theoretical) example, a PDF could contain two text streams
"Tiset" and "hsiatx", with embedded positioning commands, which
reads on the screen as "This is a text". In any case, even putting
up reasonable guards against running into out-of-order text blocks
will take a few days, unless you find a ready-to-use library for
this task (no, I don't have pointers).
If you can, try to get your source text in a more processing-friendly
format, like DocBook XML.
J.Pietschmann
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Newbie question
Posted by Dola Woolfe <do...@yahoo.com>.
Thank you.
(Sounds like more than the 1 hour I was allocating for it.)
----- Original Message ----
From: Jean-François El Fouly <je...@elfouly.fr>
To: fop-users@xmlgraphics.apache.org
Sent: Friday, September 4, 2009 3:44:55 AM
Subject: Re: Newbie question
Le 4 sept. 09 à 03:34, Dola Woolfe a écrit :
> I'm trying to put together several elements to build a PDF translator.
>
> 1. Load a PDF in a foreign language (???)
> 2. Translate the content (Google Translate)
> 3. Output the translated PDF (FOP)
>
> So I'm guessing step 1 is not part of FOP. Can you perhaps recommend what I can use for 1.?
>
> Thanks again!
I think you should try iText. You will find an explanation of what you need near the end of "iText in Action", the authoritative book by Bruno Lowagie, the guy who designed iText in the first place. And before proceeding in your project you *should* read the caveats in his book: extracting text content from an existing PDF may not be as straightforward as you think - in fact may be almost nonsense in certain situations. A PDF API will get you the text content in the order it was technically generated, which may not be the "textual" order (the order you read the elements in a book).
My own experience in top of this is that it is very difficult to extract text content from non-European or large fonts (the CID-keyed fonts, roughly said, those who have more than WinAnsi or ISO-8859-1 characters).
HTH,
Jean-François
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Newbie question
Posted by Jean-François El Fouly <je...@elfouly.fr>.
Le 4 sept. 09 à 03:34, Dola Woolfe a écrit :
> I'm trying to put together several elements to build a PDF translator.
>
> 1. Load a PDF in a foreign language (???)
> 2. Translate the content (Google Translate)
> 3. Output the translated PDF (FOP)
>
> So I'm guessing step 1 is not part of FOP. Can you perhaps recommend
> what I can use for 1.?
>
> Thanks again!
I think you should try iText. You will find an explanation of what you
need near the end of "iText in Action", the authoritative book by
Bruno Lowagie, the guy who designed iText in the first place. And
before proceeding in your project you *should* read the caveats in his
book: extracting text content from an existing PDF may not be as
straightforward as you think - in fact may be almost nonsense in
certain situations. A PDF API will get you the text content in the
order it was technically generated, which may not be the "textual"
order (the order you read the elements in a book).
My own experience in top of this is that it is very difficult to
extract text content from non-European or large fonts (the CID-keyed
fonts, roughly said, those who have more than WinAnsi or ISO-8859-1
characters).
HTH,
Jean-François
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Newbie question
Posted by Dola Woolfe <do...@yahoo.com>.
I'm trying to put together several elements to build a PDF translator.
1. Load a PDF in a foreign language (???)
2. Translate the content (Google Translate)
3. Output the translated PDF (FOP)
So I'm guessing step 1 is not part of FOP. Can you perhaps recommend what I can use for 1.?
Thanks again!
----- Original Message ----
From: Martin Edge <Ma...@asmorphic.net.au>
To: fop-users@xmlgraphics.apache.org
Sent: Thursday, September 3, 2009 8:08:28 PM
Subject: RE: Newbie question
.... and predominately is spelt predominantly (whoops)...
-----Original Message-----
From: Martin Edge [mailto:Martin.Edge@asmorphic.net.au]
Sent: Friday, 4 September 2009 10:05 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Newbie question
Hey Dola,
Try http://xmlgraphics.apache.org/fop/faq.html
What do you mean 'read PDFs' FOP is predominately for generating formats
such as PDF, PCL, Postscript and AFP
Thanks
Martin.
-----Original Message-----
From: Dola Woolfe [mailto:dolachin@yahoo.com]
Sent: Friday, 4 September 2009 10:03 AM
To: fop-users@xmlgraphics.apache.org
Subject: Newbie question
I did my homework, but this does not appear to be an FAQ!
How does FOP read PDF's?
Many thanks in advance,
Dola
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Newbie question
Posted by Martin Edge <Ma...@asmorphic.net.au>.
.... and predominately is spelt predominantly (whoops)...
-----Original Message-----
From: Martin Edge [mailto:Martin.Edge@asmorphic.net.au]
Sent: Friday, 4 September 2009 10:05 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Newbie question
Hey Dola,
Try http://xmlgraphics.apache.org/fop/faq.html
What do you mean 'read PDFs' FOP is predominately for generating formats
such as PDF, PCL, Postscript and AFP
Thanks
Martin.
-----Original Message-----
From: Dola Woolfe [mailto:dolachin@yahoo.com]
Sent: Friday, 4 September 2009 10:03 AM
To: fop-users@xmlgraphics.apache.org
Subject: Newbie question
I did my homework, but this does not appear to be an FAQ!
How does FOP read PDF's?
Many thanks in advance,
Dola
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Newbie question
Posted by Martin Edge <Ma...@asmorphic.net.au>.
Hey Dola,
Try http://xmlgraphics.apache.org/fop/faq.html
What do you mean 'read PDFs' FOP is predominately for generating formats
such as PDF, PCL, Postscript and AFP
Thanks
Martin.
-----Original Message-----
From: Dola Woolfe [mailto:dolachin@yahoo.com]
Sent: Friday, 4 September 2009 10:03 AM
To: fop-users@xmlgraphics.apache.org
Subject: Newbie question
I did my homework, but this does not appear to be an FAQ!
How does FOP read PDF's?
Many thanks in advance,
Dola
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Newbie question
Posted by Chris Bowditch <bo...@hotmail.com>.
John Burgess wrote:
> It doesn't!
That isn't 100% accurate. FOP can parse a PDF included as an external
graphic using an extension developed by Jeremias Maerki. Further details
and download link to the extension can be found here:
http://wiki.apache.org/xmlgraphics-fop/HowTo/EmbeddedPdf
Although I realise that isn't quite what the OP asked for. I mention
this just for the sake of accuracy for the archives.
Thanks,
Chris
>
> --
> John Burgess
> Risk Decisions Limited
> Whichford House
> Parkway Court
> Oxford Business Park South
> OX4 2JY
>
> T: 01865 718666
> F: 01865 718600
> M: 07984 863890
> E: john.burgess@riskdecisions.com
> W: http://www.riskdecisions.com
>
>
>
> ----- Original Message -----
> *From:* Dola Woolfe <do...@yahoo.com>
> *To:* fop-users@xmlgraphics.apache.org
> *Sent:* 04/09/2009 1:02:50 AM +0100
> *Subject:* Newbie question
>
>
>> I did my homework, but this does not appear to be an FAQ!
>>
>> How does FOP read PDF's?
>>
>> Many thanks in advance,
>>
>> Dola
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
>
> The annual Risk Decisions European User Conference will take place on
> the 12th November 2009, Oxfordshire -
> click here <http://www.riskdecisions.com> to find out more and register
> to attend.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Newbie question
Posted by John Burgess <jo...@riskdecisions.com>.
It doesn't!
--
John Burgess
Risk Decisions Limited
Whichford House
Parkway Court
Oxford Business Park South
OX4 2JY
T: 01865 718666
F: 01865 718600
M: 07984 863890
E: john.burgess@riskdecisions.com
W: http://www.riskdecisions.com
----- Original Message -----
*From:* Dola Woolfe <do...@yahoo.com>
*To:* fop-users@xmlgraphics.apache.org
*Sent:* 04/09/2009 1:02:50 AM +0100
*Subject:* Newbie question
> I did my homework, but this does not appear to be an FAQ!
>
> How does FOP read PDF's?
>
> Many thanks in advance,
>
> Dola
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
The annual Risk Decisions European User Conference will take place on the 12th November 2009, Oxfordshire -
<a href="http://www.riskdecisions.com">click here</a> to find out more and register to attend.
Re: Newbie question
Posted by Paul Vinkenoog <pa...@vinkenoog.nl>.
Hello Dola,
> I did my homework, but this does not appear to be an FAQ!
>
> How does FOP read PDF's?
It doesn't, at least not to my knowledge. It reads Formatting Objects
files (typical extension: .fo) and *produces* PDF and other formats.
Paul Vinkenoog
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org