473,395 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

pdf2txt

B P
Is there a way via Python or even Perl to capture records from a pdf and
output a delimited text file? My work has a situation with a trunk
load of data forms that were scanned as pdfs.

The data needs to be taken from the forms and moved into a database, so
I figure that comma-delimited format will work fine. The amount of
man-hours it would take to manually do this is very cost-prohibitive for
what we have to work with.

I know that a txt2pdf exists, was checking to see if the opposite would
as well.

BP
Jul 18 '05 #1
7 3060
LB
I know that a txt2pdf exists, was checking to see if the opposite would
as well.


I'm sure that from Acrobat you can save a .pdf as .rtf (that is text...).
Then it will be easy to do anything on it.
I remember also some utilities to "pdf2txt", try a search on google.

LB
Jul 18 '05 #2

B P wrote:
Is there a way via Python or even Perl to capture records from a pdf and
output a delimited text file? My work has a situation with a trunk
load of data forms that were scanned as pdfs.

The data needs to be taken from the forms and moved into a database, so
I figure that comma-delimited format will work fine. The amount of
man-hours it would take to manually do this is very cost-prohibitive for
what we have to work with.

I know that a txt2pdf exists, was checking to see if the opposite would
as well.

BP


You may try XPDF

http://www.foolabs.com/xpdf/

They include source code and some utilities like pdfimages of pdftotext.
Maybe you can call these from Python, or link via a C extension.

Hope this helps

Aurelio
Jul 18 '05 #3
B P wrote:
Is there a way via Python or even Perl to capture records from a pdf and
output a delimited text file? My work has a situation with a trunk
load of data forms that were scanned as pdfs.

The data needs to be taken from the forms and moved into a database, so
I figure that comma-delimited format will work fine. The amount of
man-hours it would take to manually do this is very cost-prohibitive for
what we have to work with.

I know that a txt2pdf exists, was checking to see if the opposite would
as well.

BP

Have a look at pdftext, part of xpdf
(http://www.foolabs.com/xpdf/home.html). This will convert the pdf into
plaintext format. You will probably have to parse this plaintext to
convert it into somesthing useful.
Jul 18 '05 #4
For me 'ps2ascii' did the job...
Jul 18 '05 #5
LB wrote:
I know that a txt2pdf exists, was checking to see if the opposite would
as well.

I'm sure that from Acrobat you can save a .pdf as .rtf (that is text...).
Then it will be easy to do anything on it.
I remember also some utilities to "pdf2txt", try a search on google.

LB

Unfortunately the text you get from Acrobat, or most other
transformations on PDF, won't guarantee any particular order of the
elements. This will make pasing difficult, but if all your documents are
similar you may get enough similarity from a text (not, IIRC, rich text)
file from Acrobat.

For extra marks you can use Acrobat's automation interfaces to actually
convert the PDFs. Good luck!

regards
Steve
Jul 18 '05 #6
In article <Z3*******************@newsread2.news.atl.earthlin k.net>,
B P <na********@mindspring.com> wrote:
Is there a way via Python or even Perl to capture records from a pdf and
output a delimited text file? My work has a situation with a trunk

Jul 18 '05 #7
B P <na***************@mindspring.com> wrote:

Is there a way via Python or even Perl to capture records from a pdf and
output a delimited text file? My work has a situation with a trunk
load of data forms that were scanned as pdfs.


SCANNED as PDFs? Do you mean these were paper forms, filled in using
printed handwriting, then scanned into a TIFF and wrapped up in a PDF?

If so, your job is next to impossible. You can extract the original
bitmapped image out of the PDF, and from that you MIGHT be able to use an
OCR program to extract the text, but unless the forms were specifically
designed for machine reading, that process tends to be error-prone. It
might be more efficient to have human beings translate them.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike | last post by:
Hello, I'm looking to create a PHP script that will automatically generate an index/menu/list (whatever) based on the PDF files that are within a particular directory. I would like the script...
2
by: Miki Tebeka | last post by:
Hello All, I'm looking for a PDF parser. Any pointers? 10x. Miki
2
by: david | last post by:
hi: The file can be PDF or Word format. Any help? thx
1
by: Rukmal Fernando | last post by:
Hi, I'm working on a tool to do text indexing on documents and want to include support to index PDF files as well. Does anyone know any tool or method of extracting the text from PDF files into...
12
by: Jay | last post by:
Let's say, for instance, that one was programming a spell checker or some other function where the contents of a string from a text-editor's text box needed to be split so that the resulting array...
2
by: Vyz | last post by:
I am looking for a PDF to text script. I am working with multibyte language PDFs on Windows Xp. I need to batch convert them to text and feed into an encoding converter program Thanks for any...
3
by: grey | last post by:
does anyone suggest me how to write a windows application for comparing two pdf content. The requirement is very easy... i only need to inform user two pdf are differnet, no need to spot where the...
5
by: kamalatanvi | last post by:
How to use this module File::Extract::PDF to extract the text from pdf. Need the guidance in writing the program. thank you
3
by: SteveB | last post by:
I have posted this question in the Visual Basic 2005 and Visual Basic .Net 2005 discussion groups, also. Hi. I am developing an application/web page with VB.Net that will populate a SQL...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.