Fixing PDF EOF Errors with PyPDF

2010-11-14 Thread Brett Bowman
Hey all, I'm trying to read a library of my company's PDFs, but about a third of them can't be opened. PyPDF (v1.12) spits out this error: pyPdf.utils.PdfReadError: EOF marker not found I searched for the answer via google, but all I found was this link: http://lindaocta.com/?tag=pypdf. She sug

Re: Errors with PyPdf

2010-09-27 Thread flebber
On Sep 27, 2:46 pm, Dave Angel wrote: > On 2:59 PM, flebber wrote: > > > > > Traceback (most recent call last): > >    File "C:/Python26/Pdfread", line 16, in > >      open('x.txt', 'w').write(content) > > NameError: name 'content' is not defined > > When i use. > > > import pyPdf > > > def getPD

Re: Errors with PyPdf

2010-09-26 Thread Dave Angel
On 2:59 PM, flebber wrote: Traceback (most recent call last): File "C:/Python26/Pdfread", line 16, in open('x.txt', 'w').write(content) NameError: name 'content' is not defined When i use. import pyPdf def getPDFContent(path): content =C:\Components-of-Dot-NET.txt" # Load P

Re: Errors with PyPdf

2010-09-26 Thread Tim Roberts
flebber wrote: > >okay thanks I thought that when I set content here > >def getPDFContent(path): >content = "C:\Components-of-Dot-NET.pdf" You have a backslash problem here. You need need to say: content = "C:\\Components-of-Dot-NET.pdf" or content = "C:/Components-of-Dot-NET.pdf" or

Re: Errors with PyPdf

2010-09-26 Thread flebber
On Sep 27, 12:49 pm, MRAB wrote: > On 27/09/2010 01:39, flebber wrote: > > > > > On Sep 27, 9:38 am, "w.g.sned...@gmail.com" > > wrote: > >> On Sep 26, 7:10 pm, flebber  wrote: > > >>> I was trying to use Pypdf following a recipe from the Activestate > >>> cookbooks. However I cannot get it too wo

Re: Errors with PyPdf

2010-09-26 Thread MRAB
On 27/09/2010 01:39, flebber wrote: On Sep 27, 9:38 am, "w.g.sned...@gmail.com" wrote: On Sep 26, 7:10 pm, flebber wrote: I was trying to use Pypdf following a recipe from the Activestate cookbooks. However I cannot get it too work. Unsure if it is me or it is beacuse sets are deprecated.

Re: Errors with PyPdf

2010-09-26 Thread flebber
ent(path): > >     content = "C:\Components-of-Dot-NET.pdf" > >     # Load PDF into pyPDF > >     pdf = pyPdf.PdfFileReader(file(path, "rb")) > >     # Iterate pages > >     for i in range(0, pdf.getNumPages()): > >         # Extract text from pa

Re: Errors with PyPdf

2010-09-26 Thread flebber
On Sep 27, 10:39 am, flebber wrote: > On Sep 27, 9:38 am, "w.g.sned...@gmail.com" > wrote: > > > > > On Sep 26, 7:10 pm, flebber wrote: > > > > I was trying to use Pypdf following a recipe from the Activestate > > > cookbooks. However I cannot get it too work. Unsure if it is me or it > > > is b

Re: Errors with PyPdf

2010-09-26 Thread flebber
On Sep 27, 9:38 am, "w.g.sned...@gmail.com" wrote: > On Sep 26, 7:10 pm, flebber wrote: > > > I was trying to use Pypdf following a recipe from the Activestate > > cookbooks. However I cannot get it too work. Unsure if it is me or it > > is beacuse sets are deprecated. > > > I have placed a pdf i

Re: Errors with PyPdf

2010-09-26 Thread w.g.sned...@gmail.com
On Sep 26, 7:10 pm, flebber wrote: > I was trying to use Pypdf following a recipe from the Activestate > cookbooks. However I cannot get it too work. Unsure if it is me or it > is beacuse sets are deprecated. > > I have placed a pdf in my C:\ drive. it is called "Components-of-Dot- > NET.pdf" You

Re: Errors with PyPdf

2010-09-26 Thread MRAB
On 27/09/2010 00:10, flebber wrote: I was trying to use Pypdf following a recipe from the Activestate cookbooks. However I cannot get it too work. Unsure if it is me or it is beacuse sets are deprecated. The 'sets' module pre-dates the built-in 'set' class. The warning is just to inform you tha

Errors with PyPdf

2010-09-26 Thread flebber
I was trying to use Pypdf following a recipe from the Activestate cookbooks. However I cannot get it too work. Unsure if it is me or it is beacuse sets are deprecated. I have placed a pdf in my C:\ drive. it is called "Components-of-Dot- NET.pdf" You could use anything I was just testing with it.

File IO errors with PyPDF

2007-03-09 Thread John Henry
Hi list, I am having trouble with PyPDF (tried earlier as well as latest version 1.9). I am using it to combine a number of single page PDF files into one. It works perfectly for up to 8 files but after that, I get a "too many files opened" message. My code goes somewhat like: PdfOutput = Pdf