You are not logged in.
Pages: 1
Does anybody know how I may be able to extract the content from a pdf how it looks like?
I normally get some pdfs that are not linearized or whatever annoys pdftotext to work properly ...
for example, this text, every word is separated by ^M, and it is just unreadable
Offline
From what I've read and tried, files won't convert well when they don't conform to current pdf standards. The example you gave seems to be one such file.
A failed ghostscript conversion shows this output:
**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> Mac OS X 10.6.2 Quartz PDFContext <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
Acrobat Reader and hexdump both say the example is a 'PDF 1.3' or 'Acrobat 4' file.
I don't see the '^M' when using pdftotext, but I do get garbled output. A simple copy and paste, from Acrobat Reader or from epdfview to any text editor, gives me each word followed by a newline.
It may be that a simple automated solution isn't available.
Offline
Hi
I had similar problems building some fax mailing scripts, then I used pdf2ps to convert to ps and then ps2ascii to get the text, and then I get the text without all those glitches
Hope this helps
-
Arch64 - Acer AX3950 - i5-650 3.2 GHz - 8 GB RAM - Nvidia GeForce 320 1 GB Ram
Arch32 - Samsung NC10 - 2 GB Ram
Offline
clmates,
I know this was some time ago but wanted to say thanks -- you have just saved me from having to retype ~50k words from reading a PDF/printout.
pdf2ps and then ps2ascii has given me clean output I can reformat and reuse (I've been asked to resubmit a long text in a word processed format after the initial work was a PDF via LaTeX, and I've lost the original sources).
Cheers!
Offline
Pages: 1