Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

File does not begin with '%PDF-' ProblemHelpful Member!(3) 

ctyankeeinok (MIS) (OP)
4 May 04 12:59
I have two users who cannot download pdf's from my https web site.  Other users have no problem viewing the pdf's.

Planned behavior: When the user clicks on the link, a new browser instance appears and the pdf is supposed to appear inside.

Actual behavior for 2 users: User clicks on the link, a new browser instance appears with nothing in it and Adobe Acrobat loads with a pop up stating File does not begin with '%PDF-'. Only 2 users so far (that I am aware of) have this problem.  I have checked the Adobe website and the solutions offered there do not apply.  The user is not using AOL software and they cannot seem to save the file.  The file is not corrupt.  I downloaded it and sent it to the same user and she could open the file. She was also able to read a pdf from the Adobe website. I don't know if being SSL has anything to do with it.

(OK, I know there is an old thread on this but it is over 2 yrs old and the solutions offered did not apply).
be451 (Programmer)
4 May 04 14:28
I am having the same problem with a .NET website that I am supporting.  In part, the website provides pdf files to the user, which are generated on the fly using a Crystal Report.  The users are all using IE 6.0 to view the pdf files.

About the only difference is as follows:  We first noted this problem about 9 months ago, and discovered a work around.  We instructed the user to open Acrobat Reader (5.0), and then open the Preferences dialog box (Edit/Preferences menu option).  We then instructed the user to uncheck the Display PDF in Browser option.  This solved the problem for about 7 months.

But the same user recently reported that the problem has returned.  We verified that the Display PDF in Browser option was unchecked on her system.  And other users, including myself, are able to view the reports without a problem. And now a few other users are reporting the same problem.

Any help would be appreciated.  
netgator (IS/IT--Management)
20 May 04 15:35
Hummm...  All I can say it "Ditto"...  We solved the problem a while back by trial and error. Any users that reported the problem - which was just a handful of them out of about 400 had to uncheck the "display in browser" option just as in be451's post.  Now just recently it has begun to crop up again even if the display in browser is NOT checked - we have been able to fix the new problem in a few cases by totally uninstalling 6.0 (including registry entries) and reinstalling 5.0 from scratch - which still didn't fix 2 of the machines.

Our main problem is that most of our users experiencing the problem on our site report that they operate just fine with other companies web sites - so they rightly feel that it is our problem and they have no intention of uninstalling 6.0... I can't say that I blame them - but I have to disagree in that I believe that it is an Adobe problem.

I guess I am adding to the post in hopes that if enough people have experienced the same issue someone will take notice.

Please help.
falcondrum (IS/IT--Management)
4 Jun 04 10:46
Do you have Acrobat 5(full) and Acrobat Reader 6 installed on the same system?  This is known bug. You must have both 5.x products or both 6.x products
netgator (IS/IT--Management)
4 Jun 04 16:17
In my case there is mixed versions on one of the systems -

The full version of Acrobat 5.x and an upgraded version of Acrobat Reader from 5.x to 6.x (this is my machine) - Is there a fix posted other than upgrading my Full version of Acrobat to 6.x?

However, I must also state that there are still other systems having the same problem that have only Acrobat 6.0 reader installed and NO versions of the full product.  We continue getting several complaints per week from users in the field that seem to have no issues with other sites - and we have only limited solutions for them.
ctyankeeinok (MIS) (OP)
15 Jun 04 10:45
My user upgraded her laptop and the problem disappeared.  I think she had mixed versions of Acrobat and Acrobat reader.  I am not certain, since she is a customer and I did not have access to her machine.
Helpful Member!(2)  001254 (Programmer)
5 Jul 04 4:13
Hi!

We had the same problem with the pdf files..
i searched the web for more informations and i also seen this thread..

our very cool coder petrick has found a solution for the problem.. :)

we have a apache2 running.. so i can´t assure you that it´s running on apache 1 too..

whatever..

all you have to do is to look into the file magic.. located in: /etc/apache2

there you will find a part like that..

# Acrobat
# (due to clamen@cs.cmu.edu)
0      string          %PDF-           application/pdf

all you have to do now is to uncomment the 3rd line with a "#"..

after that it should look like that:

# Acrobat
# (due to clamen@cs.cmu.edu)
#0      string          %PDF-           application/pdf

save the file.. it might be necessary to to restart the apache..

hope it works!


greetz
Sven
Helpful Member!  001254 (Programmer)
5 Jul 04 15:39
update :P

well.. after we fixed the problem it worked with all browsertypes.. but not with the internet explorer... well.. after we tried a little bit we also told the provider about the problem..

so.. now i have the definitly working solution..

in the file mime.types, located in /etc you will find a line like "application/pdf"..

replace this line with this line "application/x-pdf"


also the provider said, it´s possible to do that with this command line too:

perl -pi -e 's/application\/pdf/application\/x-pdf/' /etc/mime.types /etc/init.d/apache2 restart

so you see you have to restart your apache also at the first way of solution..

so.. now it should work.. we had no further problems..

haeff pfunn and a nice day..

sven
Murgle (TechnicalUser)
7 Jul 04 10:19
Not sure if this is relevant, support page from Adobe

http://www.adobe.co.uk/support/toptech/acrobat/319294/main.html

Rule Britannia, Britannia Waives the Rules

mopacfan (Programmer)
15 Jul 04 10:23
Not sure if this is relevant, support page from Adobe

It's not.  That information is useless.  I don't think even Adobe knows how to fix this problem.
Carrero (MIS)
18 Aug 04 17:14
We had the same problem here when one of our .net apps generates a PDF back to IE. What we do to fix it is, believe it or not, delete the temporary internet files. It worked in all instances thus far. However, this is just a temporary cure and does not prevent reccurence of the problem. I hope this helps out.
ctyankeeinok (MIS) (OP)
18 Aug 04 19:28
We have discovered deleting temporary internet files helps in some cases.  That is the solution for when nothing appears at all - just a blank browser (we pop up a separate instance for the browser).  This does not work when the user gets the File does not begin with '%PDF-' error.

I have had additional users with this problem.  We tried Sven's solution (above), but it has not worked for us (unless we did it incorrectly).

Our next step is to watch what is being downloaded with a sniffer.

Is this just a problem on Internet Explorer, or are other browsers having this problem as well?
netgator (IS/IT--Management)
19 Aug 04 8:32
We did finally find a solution for Servers running IIS 5.0:

The fix is applied to your web server as follows:

NOTE: These instructions are for IIS 5.0 so they will vary slightly for IIS 6.0 - these instructions are based on the post from 001254 (Programmer) so thanks for the help!

In Internet Services Manager:

1.) On IIS Web Server (Machine Name) right click and select "Properties"
2.) Select Master Properties: "WWW service" then the "Edit" button
3.) Select the "HTTP Headers" Tab
4.) In the Mime Map section select "File Types"
5.) In the registered file types select "New Type"
6.) In the Associated extension box enter "pdf"
7.) In the Content Type MIME: box enter "application/pdf"
8.) Select "OK" and save changes
9.) If you get any notifications regarding inheritance overrides select the "select all" button
and
then click "OK".

This fixed the issue on the only IE system we had left having the problem...
LawnBoy (MIS)
9 Feb 05 12:01

Quote (001254):

in the file mime.types, located in /etc you will find a line like "application/pdf"..

replace this line with this line "application/x-pdf"

Thank You! Have a belated star!

peterwalsham (Programmer)
19 Jul 05 10:55
Symptom
============
The following error can occur with PDFs served by Apache httpd, a server-side solution is given at the bottom of this post.

On trying to open a PDF file with the Acrobat Reader plugin (acroread) under both Windows and Linux, with Microsoft Internet Explorer (MS IE) and Firefox, the following message appears:  
File does not begin with '%PDF-'.

The symptom above is a very general error message from the Acrobat plugin, and here I only describe one specific problem that can produce it. It is basically caused by the brower handing acroread a file and acroread going "arrrgg I have no idea what this file is".

With all the browsers above, you could save the file to disk first, then open it with Acrobat Reader and every thing is fine, it is only when the file is streamed straight from the server gzipped and passed to the plugin that the problem occurs.


Scenario
=============
To enable gzip compression for html, xhtml etc with Apache that came with Red Hat 9, it was only necessary to use the following line (for example in /etc/httpd/conf/httpd.conf):

SetOutputFilter DEFLATE

The default Apache configuration would not gzip certain other types of files, including PDFs. Thus not confusing acroread when it tries to display the file.

However, later Linux versions associated with Red Hat require a few extra lines with Apache to avoid gzipping PDF files, these OSs include:

Fedora Core 2 (FC2)
Red Hat Enterprise Linux 3 (RHEL3)


Solution
=============
The additional Apache configuration lines (for example in /etc/httpd/conf/httpd.conf) required are as follows:

SetOutputFilter DEFLATE
DeflateFilterNote ratio
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary

Peter Walsham
Axomic Ltd
OpenAsset Image & Digital Asset Management for Architects
http://www.axomic.com

micjohnson (Programmer)
22 Jul 05 13:11
I had the same type error. Looks like its a common problem in Adobe Acrobat Reader 6.0  So i upgraded into Reader 7.0 and it works well now.

Regards
micjohnson

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close