Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-04-2014, 02:25 PM
|
#1
|
Member
Registered: Sep 2009
Posts: 51
Rep:
|
Code to convert pdf to csv
Hi,
I am working on a tool where I need to convert pdf file to csv.
I dont know much about converting file formats.
Please let me know if we already have an utility to convert pdf to csv filemat .
Thank you
|
|
|
08-04-2014, 02:48 PM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,727
|
Quote:
Originally Posted by ibabhelix
Hi,
I am working on a tool where I need to convert pdf file to csv.
I dont know much about converting file formats. Please let me know if we already have an utility to convert pdf to csv filemat .
|
There are many tools to convert PDF's into readable text..providing the PDF *IS* text to start with, and not just pages of scanned images. The pdftotext utility is one...there are several others; did you even try to look this up with a Google search????
Since you've been here for over five years now, and have asked questions about shell scripting and programming, it should be easy for you to do something with the pdftotext utility and standard Linux commands (split, grep, sed, etc.), to get a CSV file. Since you don't post any examples of the input, the desired output, or give us ANY details at all, there's not much else we can tell you.
|
|
1 members found this post helpful.
|
08-06-2014, 02:11 PM
|
#3
|
Member
Registered: Sep 2009
Posts: 51
Original Poster
Rep:
|
Yes, I have been here for 5 years but not working on Linux anymore. Well anyways , I too found this utility pdftotext .
I am trying to get the utility .
Is there any other tool you know of ?
Thank you
|
|
1 members found this post helpful.
|
08-06-2014, 02:44 PM
|
#4
|
Senior Member
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683
|
there is no magic tool to convert your pdf to csv
BUT, as already pointed out by TBOne, there is a tool ( pdftotext ) which , when given a pdf containing text,, will output simple text.
you can then 'work with' that text output to create a 'csv' file
|
|
2 members found this post helpful.
|
08-06-2014, 02:48 PM
|
#5
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,727
|
Quote:
Originally Posted by ibabhelix
Yes, I have been here for 5 years but not working on Linux anymore. Well anyways , I too found this utility pdftotext. I am trying to get the utility.
|
It is probably already installed on your system, or available through the online repositories of your distro. As was said before, you don't tell us ANYTHING about your setup, give us data examples, or even tell us what version/distro of Linux. Unless you provide details and answer questions when asked, there's not much point in posting, since there's not much anyone can tell you.
Quote:
Is there any other tool you know of ?
|
There is no tool to do exactly what you want to do...because there are an almost INFINITE number of possibilities and variables about "creating a csv". Like what to split on? Character set? Quoted fields or not? Quotes WITHIN the fields??
As said, extract the text from the PDF to a file...work with it from there. How you do that will depend on the data, and what you write your script/program in.
|
|
|
08-06-2014, 03:39 PM
|
#6
|
Senior Member
Registered: Apr 2007
Location: West Virginia
Distribution: Manjaro
Posts: 1,012
|
Quote:
Originally Posted by ibabhelix
Hi,
I am working on a tool where I need to convert pdf file to csv.
I dont know much about converting file formats.
Please let me know if we already have an utility to convert pdf to csv filemat .
Thank you
|
Does the pdf contain a data table? If it is a table sometimes you get lucky doing a copy from the pdf and pasting into a spreadhseet program  A cheat but I have had it work.
If this pdf does not have a data table, why would you want it as a csv anyway? Seems to me a text file would be better.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 12:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|