Re: Newbie question

2009-09-04 Thread Jean-François El Fouly


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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Newbie question

2009-09-04 Thread Chris Bowditch

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.burg...@riskdecisions.com
W: http://www.riskdecisions.com



- Original Message -
*From:* Dola Woolfe dolac...@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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Newbie question

2009-09-04 Thread Dola Woolfe


Thank you.

(Sounds like more than the 1 hour  I was allocating for it.)



- Original Message 
From: Jean-François El Fouly jean-franc...@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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




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



Re: Newbie question

2009-09-04 Thread J.Pietschmann

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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Newbie question

2009-09-03 Thread Martin Edge
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:dolac...@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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



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



Re: Newbie question

2009-09-03 Thread Paul Vinkenoog
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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: Newbie question

2009-09-03 Thread Martin Edge
 and predominately is spelt predominantly (whoops)...

-Original Message-
From: Martin Edge [mailto:martin.e...@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:dolac...@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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



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



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



Re: Newbie question

2009-09-03 Thread Dola Woolfe
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 martin.e...@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.e...@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:dolac...@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-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



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



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


  

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



Re: Newbie question for incrementing a number

2007-07-13 Thread Louis . Masters
Check the archives for this group or try: 
http://www.dpawson.co.uk/xsl/sect2/N4806.html

Oh, and try not to cross post.

-Lou

alphamanic [EMAIL PROTECTED] wrote on 07/13/2007 12:29:33 PM:

 
 Hi Guys,
 
 This is a newbie question.
 
 I have an XSL which reads in some of value from xml using Document()
 function and some some XSL:PARM. I'm using fo:block to display the
 content in a block.
 Simply what I want to do is create a counter that will increment for my 
each
 FO:BLOCKi.e.
 
 fo:block
 display counter value
 xsl:valueOf select=$param1/
 /fo:block
 
 fo:block
 display counter value
 xsl:valueOf select=document(somexml.xml)/note1/
 /fo:block
 
 etc.
 
 Please help? - I've tried the below code but it doesn't work:
 xsl:parm name=counter select=1/
 some template
 fo:block
 xsl:with-parm name=counter select=$counter + 1/
 xsl:valueOf select=$counter/ - this return 1 instead of 2
 /some template
 -- 
 View this message in context: http://www.nabble.com/Newbie-question-
 for-incrementing-a-number-tf4075495.html#a11582913
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Re: Newbie question for incrementing a number

2007-07-13 Thread Trevor Keast
You cannot increment a number using (x = x + 1) as you can in most 
languages, however you can use the position() function as a counter in 
many cases.


For example:

xsl:valueOf select=position()/

The alternative to this is to use a recursive template, which is a bit 
more tricky.


Hope that helps,

Trevor.

alphamanic wrote:

Hi Guys,

This is a newbie question.

I have an XSL which reads in some of value from xml using Document()
function and some some XSL:PARM. I'm using fo:block to display the
content in a block.
Simply what I want to do is create a counter that will increment for my each
FO:BLOCKi.e.

fo:block
display counter value
xsl:valueOf select=$param1/
/fo:block

fo:block
display counter value
xsl:valueOf select=document(somexml.xml)/note1/
/fo:block

etc.

Please help? - I've tried the below code but it doesn't work:
xsl:parm name=counter select=1/
some template
fo:block
xsl:with-parm name=counter select=$counter + 1/
xsl:valueOf select=$counter/ - this return 1 instead of 2
/some template


--
Trevor Keast
Client Server Specialists Inc.

Email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]