Limitations of 'pdftotext' in Linux...

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Limitations of 'pdftotext' in Linux...
# 1  
Limitations of 'pdftotext' in Linux...

Guys: I have a customer using the 'pdftotext' utility under Linux. PDFs are received via email, converted to text, etc. and it has worked nicely for years. They received a PDF from a customer and the utility will not read it. The text file is created but it's either empty or has 1-2 bytes of garbage in it. Acrobat renders the document correctly. I did a FILE -> SAVE AS TEXT inside of Acrobat and the same thing happened... an empty file. I tried it on another PDF and it worked. So why would pdftotext have an issue with a certain PDF? Could it be encrypted? Most of these files are 17 to 20kb in size. The one that will not process is a whopping 426kb. Is there a size limitation? I have used pdftotext but I have only 'used it'... I am not an expert on all its abilities. Thanks for reading and thanks for the help.

EDIT: I can upload the PDF here if anyone is interested. Thx.
# 2  
No. The file itself has problems. If you can read it with Acrobat, try to save the file as a different filename. If Acrobat cannot save it there not much you can do.

In Acrobat, open the Tools pane and select Quick Check in the Accessibility panel. This quick check will tell you if tags exist in the file. When the check is complete, a dialog box opens and tells you the accessibility status of your document. In Acrobat Pro, you can also do a full accessibility check.
# 3  
This is probably a stupid question, but is your PDF rendering text or an image, such a a scanned-in page, or text rendered to an image before being imported into the PDF? I'm not quite sure how you can check that. If your copy of Acrobat has the capability, can you perform an OCR on the document?

# 4  
The file is more-than-likely corrupted. but we need more info.

Have you ran that PDF file though a PDF checker, like this one:


That site will provide you a zip file with the text results.
# 5  
Thank you all for the reply. I did wonder if the entire document is an image but it's very hard to tell. It does not look like a scan. There are some barcode-like images in it as well as some text that is overlapping which is a bit unusual. I will try to save it to another filename. I will also attach it here in case any of you would like to see it.
# 6  
Here is the PDF in question. Thanks again. I will report back after some further testing.
# 7  
Mmm, apparently my version of Acrobat will not let me check the accessibility of the document. I feel like the barcodes are NOT the issue because we have PDFs come in with logos, etc. and those items are just ignored by pdftotext and the actual readable text is what comes out in the text file. Just the sheer size of the file suggests that it could be an image/scan which I could see causing problems... no actual text exists in the document. Also, I saved the document in Acrobat as TTS_NEW2.pdf and it saved without issue.
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #25
Difficulty: Easy
Google was the first search engine developed for indexing the Internet.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Pdftotext from multiple pdf files to a single text file

I have a directory having a number of pdf files. I want to convert all the files to text, stored in a single text file The following creates multiple text files ls *.pdf | xargs -n1 pdftotext (1 Reply)
Discussion started by: kristinu
1 Replies

2. Linux

Linux partitions and limitations

In recently reading an article on linux basics before I embark and my personal installation project I came across this passage - IDE drives have three types of partition: primary, logical, and extended. The partition table is located in the master boot record (MBR) of a disk. The MBR is the... (12 Replies)
Discussion started by: Synchlavier
12 Replies

3. Solaris

Solaris limitations

Hi, I recently started working with Solaris, and what I noticed is that a lot of commands I used to regularly use don't work, like sed -i and grep -r. I have found work arounds for these problems though but it's a pain in the ass. I'm just wondering why they decided not to include these handy... (4 Replies)
Discussion started by: Subbeh
4 Replies

4. Red Hat

Eth0 Limitations

Hi, I have noticed some performance issues on my RHEL5 server but the memory and CPU utilization on the box is fine. I have a 1G full duplexed eth0 card and I am suspicious that this may be causing the problem. My eth0 settings are as follows: Settings for eth0: Supported ports: ... (12 Replies)
Discussion started by: Duffs22
12 Replies

5. UNIX for Dummies Questions & Answers

Basic problem with pdftotext

Hi, I have used pdftotext with good results in the past, but today for some reason I keep getting the same error message. My command is as follows: And the error message is I am using Vmware player with Ubuntu server, but I don't think that is causing this issue as I have been using... (2 Replies)
Discussion started by: Joq
2 Replies

6. Red Hat

Limitations on the partition of linux

Hi, I need a documentation about limitations on the linux partition. On how many primary and extended I could create. And also on different type of storage, how many big capacity I can create. Thanks. (3 Replies)
Discussion started by: itik
3 Replies

7. UNIX and Linux Applications

gnuplot limitations

I'm running a simulation (programmed in C) which makes calls to gnuplot periodically to plot data I have stored. First I open a pipe to gnuplot and set it to multiplot: FILE * pipe = popen("gnuplot", "w"); fprintf(pipe, "set multiplot\n"); fflush(pipe); (this pipe stays open until the... (0 Replies)
Discussion started by: sedavidw
0 Replies

8. HP-UX

pdftotext / PDF conversion to .txt binaries

Good day, I've been trying to look for a way to compile the Xpdf sources in our HP-UX server, but have been failing to do so because there is no GCC installed, and I don't have privileges to install GCC. I was looking for a functionality to convert PDF files to .txt, which is exactly like the... (2 Replies)
Discussion started by: mike_s_6
2 Replies

9. UNIX for Dummies Questions & Answers

csplit limitations

I am trying to use the csplit file on a file that contains records that have more than 2048 characters on a line. The resultant split file seems to ignore the rest of the line and I lose the data. Is there any way that csplit can handle record lengths greater than 2048? Thanks (0 Replies)
Discussion started by: ravagga
0 Replies

10. UNIX for Dummies Questions & Answers

mkdir limitations

What characters can't be used with a mkdir? Any limits on length of name? Thank you, Randy M. Zeitman (12 Replies)
Discussion started by: flignar
12 Replies

Featured Tech Videos