Error: File does not begin with '%PDF-'

rconstantine - October 17, 2007 - 19:58
Project:Pdfview
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Anyone else have this problem? It's only for certain content types:

minutes
story
page
FAQ

Actually, I guess only book is working for me. Strange.

Any ideas?

#1

panis - October 19, 2007 - 21:43

instead of opening the pdf when clicking on the link - save the link as a file. open this file using notepad or vi and see what shows up. You may be seeing messages generated by the TCPDF class that get output before the PDF is streamed.

#2

rconstantine - October 20, 2007 - 17:27

Thanks, I'll look at that. I think I may have fixed it though. Turns out it was my fault. I have modified this module so that books don't start a new page for each node and I had commented out one line in one of the functions. I have now wrapped that line in an if statement which bypasses it only for books. Things are fine.

I see I'll probably have to do more work on this module over time. If I make any significant upgrades, I'll post them for all to use. And now you've given me a good testing technique, so thanks.

 
 

Drupal is a registered trademark of Dries Buytaert.