Make page open pdf file without adding .pdf to the end of the URL.

Posted on 2012-04-11
Last Modified: 2012-06-27
I want to create a page via the "New Page" option in the backend of Wordpress site that has the URL of the new page (example:, but opens a file.pdf without further adding to the URL path?

Assistance is greatly appreciated. If you could create a free jing video of the procedure (, then that would be even better.

Assistance is greatly appreciated.
Question by:rtod2
  • 3
  • 2
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 37836283
Are you aware that browsers only open a PDF in the browser if the user has a working PDF plugin like the Adobe PDF plugin?  If they don't have a PDF reader and/or don't have a plugin, it won't open in the browser.  It will open the download dialog instead.

Author Comment

ID: 37836297
Yes, I am aware. I regret that you answered with that 'instead of' vs 'in addition to' an actual solution. EE does not allow me to request attention until after a long period of time has passed. This means that this question will likely go stale for several days until it is answered with a real answer.
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37836519
Interesting response.  My comments don't prevent anyone else from adding theirs.  

I'll expand on what I was saying.  It's the plugin in the browser on the user's computer that would open a PDF.  The two ways of telling the browser to use the plugin are the '.pdf' extension and the 'Content-type: application/pdf' header.  Here is some code to open the file in PHP on the server and set the headers and send the data.  You can try that and see if it will do what you want.
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center


Author Comment

ID: 37837982
Thank you sir.  Not sure how to do that.  I'm looking for specific steps on how I accomplish my objective.
LVL 70

Accepted Solution

Jason C. Levine earned 250 total points
ID: 37840960
Better yet...

Load the PDF to Scribd and embed the result in your WordPress page.

>> If you could create a free jing video of the procedure (

No, sorry.

>> This means that this question will likely go stale for several days until it is answered with a real answer.

Guess you're in luck then.

Author Closing Comment

ID: 37841374
Not what I was looking for.  Thanks though.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you think that WordPress is just for blogs?  Think again!  WordPress is really a fantastic all around platform that you can use to develop websites on.  Integrated into its basic functionality is the ability to create pages using your choice of a…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question