[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Convert a pdf file
On Sat, 2008-11-22 at 23:34 +0000, Peter Collier wrote:
> I have a pdf file that is a mixture of drawings and text. The problem is, is
> that the text is in Italian. Anyone know how it can be converted to english
> without rewriting the whole file, by translating each word using Bablefish or
> a dictionary.
>
> Peter C.
You can't take a PDF file and (using a text editor) convert bits of text
into something different. Doing this will mess up the PDF's cross
reference table, which is a little table (commonly at the end of the
file, and there may be more than one) giving the locations of objects
(bits of text, pictures, etc) in bytes from the start of the file. If
you add or subtract bytes from a text object, then all the following
entries in the cross reference table will be wrong and your PDF viewer
will complain that the document is corrupt.
If you have some software which knows how to re-create the cross
reference table(s) given the document changes then you're in business.
Try:
http://sourceforge.net/projects/pdfedit
This should enable you to take out the Italian text sections, run them
through babelfish, or some other (possibly even human) translator and
replace with the English text.
I should add that I've not done anything more than the simplest
experiments with this program, but have come across it while working
with PDF data.
best regards,
Seb James
_______________________________________________
Sheffield Linux User's Group
http://sheflug.org.uk/mailman/listinfo/sheflug_sheflug.org.uk
FAQ at: http://www.sheflug.org.uk/mailfaq.html
GNU - The Choice of a Complete Generation