Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Problem with PDF Files
Last Post 02/10/2009 4:11 PM by Guido Kuehler. 10 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Sean Nolan
New Member
New Member
Posts:29


--
01/26/2009 6:33 AM

I'm getting reports from a few users that after downloading a PDF file, they cannot open the file, Adobe Reader gives the following error "File does not begin with %pdf."

It seems it may be related to the encoding or MIME type - does anyone have any suggestions about fixing it?

Thanks
Sean

Phil Speth
New Member
New Member
Posts:14


--
01/28/2009 9:49 PM

I am getting the same issue with DMX 5.

It is not consistent.  It will happen consistently with one user on a particular link and not to another user.
It can also happen with one link to a file on a page, and then not to an Identical Link on the same page to the same file.

I copied the URL's directly of their browser, and verified that they were identical.

I did some searching on and found the following thread that seems that it may offer a solution.

http://www.tek-tips.com/v...id=834208&page=2

I will reply to this post with an exerpt of the info that seems most promising.
(Some suggestions were 1-off to help an end user.  I would need it simply to not occur)

Some notes:  I run DMX5, DNN 4.9.1, GZIP compression is enabled

Peter could you look at this and suggest a particular course of action???

Phil Speth
New Member
New Member
Posts:14


--
01/28/2009 9:55 PM
Here are the solutions that seem worth looking at:

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 worked for some:
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"
__________________________________________________
The final solution recommended that you tell the system to not compress PDF files.
The solution was shown for Apache. (I haven't checked how to set this for DNN)
Here is the Apache fix:

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 Donker
Veteran Member
Veteran Member
Posts:4536


--
01/29/2009 10:27 PM
Another suggestion: uncheck ViewByDefault for the PDF file type (table DMX_Extensions or admin page File Types)

Peter
Phil Speth
New Member
New Member
Posts:14


--
01/29/2009 10:47 PM
I tried adding this to the excluded paths, but without affect.
desktopmodules/bring2mind/dmx/download.aspx

Is this the path I should put?

Also Peter,

I am assuming that if I unchecked the setting as you mention then it would't open the PDF's in the browser?
This might be a usability problem for our end users.
Phil Speth
New Member
New Member
Posts:14


--
01/30/2009 3:46 PM
I have reluctantly turned off compression for now, and still I get this error.
On this page:
http://ww2.cityofeastlans...bid/366/Default.aspx

In Firefox, I click on the bats link. The first time it loads. The second time and after it fails.
If I clear my browser cache it will work again the first time.
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
02/03/2009 9:26 AM
It appears to be an Adobe or IE caching in combination with Adobe issue. When I turn off ViewByDefault the problem goes away. The difference is that by default the file is marked as show 'inline' when double clicking, and when you uncheck this it is marked as 'attachment'. The downside is that users see the familiar popup: "would you like to save or open ..." instead of the file opening immediately. But the implementation seems to be more robust.

On another note: I have noticed that Adobe and Vista are experiencing grave difficulties with things like UAC and the registry. Could it be that Adobe was simply not ready for Vista? What OS were you running when you experienced the above problems?

Peter
Neil Lawson
New Member
New Member
Posts:2


--
02/05/2009 12:39 PM

I tried the suggested solutions and had no luck. I could download a new file (or any file after emtying my local cache) but on the second download of the same file I received the %PDF error.

I have had problems with other file types in the past (not in DMX or DNN) and thje solution was to change the mime-type to application/octet-stream. If you do this on the web server and in DMX for PDF files you lose the inline display and incremental download but you canl consistently show the same file in an external copy of Acrobat Reader.

Basically it means PDFs work like Word/Excel etc. You download the entire file for display in the registered application without being asked if you want to view or save the file.

Its not as nice as the inline mode but it is reliable and consistent with other files.

 

Guido Kuehler
Basic Member
Basic Member
Posts:149


--
02/10/2009 10:28 AM

Adobe Reader display an Error (File not Found) when open a PDF-Document on a Website.

The Source is a lokal Problem with the Temporary Inetrnet-Files, go in Internet-Explorer under Extras/Internetoptions in the Sektion Temporary InternetFiles to Delete Files and klick in the opened Dialog on OK. Now wait any Minutes restart your Browser and open the Document.

Application and Versions:

Internet-Explorer Version: 6.x,7.x

Adobe Reader Versions: 6,7,8,9

Problem-Detaildescription:

The Internet-Exporer has reached the Maximum-Setting for the Temporary Internetfiles, the Browser load the Document but save this not in the Temporary Internetfiles and send the Open-Command to Adobe Reader but the Adobe-Reader cannot find the File.

Comments:

We have localized this Problem on many different Systems and resolve this Problem on all effected Systems.

Best Regards

Guido

DNN Skin Makers

ITP - Business IT Power

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
02/10/2009 2:45 PM
Thanks for the info Guido. As I expected it's a problem of MS and Adobe software interplay.
Guido Kuehler
Basic Member
Basic Member
Posts:149


--
02/10/2009 4:11 PM

Hi Peter,

no Problem, we have only here post the Solution because we will not spamming your Forum. You can post the Solution when you need this by other Topics.

Best Regards.

Guido

DNN Skin Makers

ITP - Business IT Power

You are not authorized to post a reply.