LEXIPIXEL, more than just a palindrome!
• Web Designer • Web Developer • Volusion • OSCommerce • WordPress Blog • Themes • Photoshop • .PSD • Templates • Logo Design • CSS • CMS • eCommerce • Online Stores • Shopping Cart • Merchant Account • Hosting • Search Engine Marketing (SEM) • Search Engine Optimization (SEO) • Solutions! • Training & Support

October 30, 2008

How to Attach a PDF to a WordPress Post

Filed under: Wordpress
Randy Harris @ 3:09 am

Resumes, printable coupons, eBooks, and many other type of documents are prepared for distribution and printing as an Adobe PDF, (Portable Document Format), file.

If you have PDF files that you want to make available for download on your blog, follow these easy steps:

  • login to the Admin area of your WordPress blog
  • click Write Post
  • give the post a Title and begin to enter the text of the post
  • at the point in your post where you want the PDF link to appear, click the Add Media icon

  • A window will appear prompting you to Choose Files to Upload.




  • Click the Choose Files to Upload button and select the .PDF file you want to attach to the post. WordPress will upload the file to your webserver, and the contents of the window will change, prompting you to enter a Title, Caption and Description.(*Note: this tutorial demonstrates how to upload a PDF to your own WordPress / website. If you want to just link to a PDF that is already on the web, simply fill in the URL and Title fields and skip the step of uploading the PDF file)



The Title is the text that will appear in your post as the link text someone will need to click to download the PDF file, enter something appropriate, (e.g.- "Download My Resume as a PDF", or "Download Printable Coupons", etc-- something to let the user, and the search engines know what the PDF file contains).

For the Link URL field, click the [File URL] button to automatically populate field with the absolute URL of the file.  (Note - this step added 9/30/2009.  This tutorial does not cover use of other URLs in this field).

You do not have to fill in any other blanks, although you may want to enter a brief description and caption for reference.

 

 

 

  • Once you have entered the Title and any other info, and populated the Link URL field, click the [Insert into Post] button.

Based on our example, the link below was inserted into this post, and you can click it to download the sample PDF file.


Download a Sample PDF file


...that's all folks!






41 Comments »

Note: The LEXIPIXEL blog is configured to use Gravatars, (Globally Recognizable Avatars). If you don't have one yet, go to en.gravatar.com and create one, then you'll have the same avatar on any blog post you comment on if the site also uses Gravatars!.
  1. Do you know why at times when we try to upload a pdf file you get an http error? But when you use the Browser uploader it works fine?

    You are using the Flash uploader. Problems?
    Try the Browser uploader instead.
    Is there something you can do to use the flash uploader ?

    Thanks.

    Comment by Calicut Students — April 10, 2009 @ 4:08 pm

  2. I checked the URL, and clicked the “Click Here to See Paper” link, (and PDF did show).

    The upload problem you’re having (with Flash uploader), is a known problem having to do with the first account with “Admin” level access, and subsequent “Admin” level accounts. I noticed your article was posted by “admin1″, so I suspect your are hitting that problem.

    If you have access to the original “admin” login, and also have a WP account which is set to Admin level, see if it works in either. Be sure to delete all cookies for that site and clear cache between tests. This could also be browser or browser setting issue.

    This article may help:
    http://thethemeblog.com/wordpress/a-solution-to-http-error-using-wordpress-flash-uploader-problem

    Or some info in the official WordPress support area…

    http://wordpress.org/support/topic/164999

    Hope this helps.

    Comment by Randy Harris — April 10, 2009 @ 9:55 pm

  3. When I follow these instructions for uploading a PDF file to a WordPress page, I get the message, “specified file failed upload test.”

    Any idea what I’m doing wrong?

    Thanks.

    Comment by Richard Myers — May 11, 2009 @ 4:32 pm

  4. I did a quick search on google for the exact error message you report, plus the term wordpress, e.g.-

    Google: “specified file failed upload test” wordpress

    It returned a URL: http://wordpress.org/support/topic/164290

    It appears to be a common, but fixable problem (something on your end, e.g. browser, file, or your host, not WordPress).

    Comment by Randy Harris — May 11, 2009 @ 11:36 pm

  5. Thank gawd for your website. I thought I was going to cry. I was shaking trying to find tips to attach a file to a doc. Thank you!

    Comment by ck — July 22, 2009 @ 5:19 pm

  6. Glad it helped!

    Comment by Randy Harris — July 22, 2009 @ 5:49 pm

  7. Just great to read some instructions that I can understand. More often I need to be a rocket scientist to understand what are meant easy to understand instructions.

    Comment by Mark Waterfield — July 29, 2009 @ 11:02 am

  8. Yes, thank you for this.

    I’m no newbie, and I searched through a lot of material (like info about uploading files in 2.7, which looked very different, and plugins that tell you what files are attached to a post) before I found this perfectly clear, very welcome set of directions.

    Comment by lilatovcocktail — August 1, 2009 @ 9:12 pm

  9. I wrote it because I couldn’t find any good directions myself. I work on so many different aspects of web development, I sometimes have to refer back to my own tutorials when I forget how I did something before. I’m glad it’s been useful to others.

    Comment by Randy Harris — August 1, 2009 @ 9:44 pm

  10. Ok i follwed all the instructions as mentioned above. It all worked fine in wordpress 2.7 but i recently upgraded to wordpress 2.8.4 .

    Now when i upload a pdf file it appears as a link and when you click on the link, it takes you to a separate page with file download link.

    All i want is that when i upload a file it appears as a downloadable link not to take me to a different page to download a file. Although When i check the html of the page i can see the link to the file attached but when i save it the wordpress editor saves it as a link to a separate page instead of a downloadable link.

    Also the attached file contains rel=”attachment” which seems to be the problem as when i remove the rel tag the file appears as a downloadable link.

    Any help greatly appreciated

    Comment by mrnav — September 30, 2009 @ 12:09 am

  11. I tried to duplicate your issue. (I am running WordPress v2.8.4 also). It works the same way for me; the PDF opens in the same window as the post and the browser [BACK] button will take you back to the post.

    I suspect it was something to do with the Link URL you used… I have updated the article to instruct people to click the “File URL” button to populate the “Link URL” field in the upload dialog. Entering something else may cause different behaviors, (such as you describe, and; which I have not experimented with… yet)

    Try again, and let us know if you can’t get it to work.

    Comment by Randy Harris — September 30, 2009 @ 1:21 am

  12. Thanks for this tip. I had to add mime type to be able to upload Windows Registry files.

    Comment by Max — October 26, 2009 @ 11:36 am

  13. YOU are the BEST. I just figured out what I was doing wrong in about 5 seconds thanks to this great post. THANK YOU! Amy

    Comment by Amy Porterfield — November 10, 2009 @ 10:21 am

  14. When I try to link a pdf to a specific page, not a blog, it doesn’t seem to link. Although it does upload to the media library and is identified there as attached to the correct page. Any advice?

    Comment by Cathy Ridley — February 18, 2010 @ 4:06 pm

  15. Did you use the Insert Into Post button after you uploaded the PDF ?

    Comment by Randy Harris — February 18, 2010 @ 4:32 pm

  16. I have spent a whole week trying night and day to insert page tags in my long separated wp posts but nothing appears. I don’t understand CODE language and the instructions give say, in wp-paginating.

    May be I have come to the right place for an explanation.

    Thanks
    Edna

    Comment by Edna — May 9, 2010 @ 12:06 pm

  17. Hi Edna,

    Unfortunately I am not using any of the pagination features or plug-ins. I suggest using the WP support forums — there are a lot of topics on paging there already, and many people who are working on the same issues.

    See: http://wordpress.org/support/

    Sorry I couldn’t be more help.

    Randy.

    Comment by Randy Harris — May 9, 2010 @ 2:50 pm

  18. Thanks for the great instructions. PDF newsletter posted successfully on my website.

    Comment by Darren — July 17, 2010 @ 10:24 am

  19. To Cathy (comment #14)
    I have same problem. I have newspaper articles that I want to link to a pdf but it wont link. Can some one give advise?

    click media, library, add new
    select files (I choose a pdf from my computer hard drive)
    click save all changes
    copy the File URL

    click pages, edit
    highlight the title of the article
    click the link icon(aka insert/edit link)
    at Link URL paste the URL of the PDF
    click insert
    click update

    AND IT DOES NOT WORK, I tried with a PDF and MS Word doc
    do I have to fill in title?

    Comment by Gayle — November 28, 2010 @ 4:32 pm

  20. Hi Gayle. You seem to be making this difficult on yourself. I just did a test to upload a .PDF to a WordPress PAGE (not a post, a page)… It was simple and worked immediately. And yes, I filled in the Title, (it is the text used for the link to the PDF).

    In Admin screen:
    1. click Pages > Add New
    2. Type some text in the body of the page editor.
    3. Position cursor at point where you want .PDF link to appear on page.
    4. Click Add Media icon
    5. Select file from computer (upload)
    6. you can change the Title text or leave it as is for testing.
    7. make sure it is using the File URL
    8. click Insert into Post

    Comment by Randy Harris — November 28, 2010 @ 5:44 pm

  21. To Randy,
    Yea it worked, all my articles have links that work. thanks.

    You are good. Can you help me figure out how to change font size, font color? I would like to do it in Visual but I don not see font or color buttons , like in a Word doc. HTML is confusing to me.

    I want to make this font smaller:
    Flamingo Tennis Center Articles:

    Comment by Gayle — November 28, 2010 @ 8:34 pm

  22. [...] to attach your PDF file’s URL , follow the directions here. by pjhalterman posted under Tutorials | No Comments »     Click [...]

    Pingback by Attaching a PDF Tutorial | read.write.connect. — January 7, 2011 @ 3:49 pm

  23. Hi, I followed the steps:
    In Admin screen:
    1. click Pages > Add New
    2. Type some text in the body of the page editor.
    3. Position cursor at point where you want .PDF link to appear on page.
    4. Click Add Media icon
    5. Select file from computer (upload)
    6. you can change the Title text or leave it as is for testing.
    7. make sure it is using the File URL
    8. click Insert into Post

    But the issue is that whenever I do file URL (step 7), it sets a location which no longer exists (as I restructured the categories) but it always upload the file to that unavailable locatoin and I’m getting 404 errors.

    Please help

    Comment by MS — February 24, 2011 @ 12:26 am

  24. Check under:

    Dashboard > Settings > Media > Store uploads in this folder

    WordPress will use that path plus the YEAR and MONTH, (in YYYY/MM/ format), e.g., the full path for the example in this post (which is from October 2008) is:

    http://lexipixel.com/wordpress/wp-content/uploads/2008/10/sample-pdf-for-wordpress2.pdf

    (path + upload archive directory + filename)

    Comment by Randy Harris — February 24, 2011 @ 1:26 am

  25. Hello,
    I am desperately trying to get a pdf to appear on a page. NOT a link to the pdf to download, but the actual pdf. Seems I’ve tryed everything, but clearly not. Any help out there?

    Comment by Lorna — March 15, 2011 @ 3:18 pm

  26. .PDF files are not “native” to HTML and require the Adobe Acrobat Reader to open the file — so you would not be able to get PDF content to appear within the (HTML) of a page.

    Additionally, since PDF requires an application to open the file —AND— the user can control if the browser (and Acrobat) should simply open the file in current browser window or tab, or in a new window or tab or save the file to disk (and not open it at all) — you can neither force or predict how the PDF will be handled.

    Before you start looking for problems in how your site delivers PDF’s, you should check your own browser settings, and better yet — test with a few browsers — and ask others to test and give you feedback.

    If you really need the content of the PDF to display “on page”, the content should be duplicated as HTML and images.

    Comment by Randy Harris — March 15, 2011 @ 7:05 pm

  27. Very helpful instructions,

    Thanks for sharing

    Comment by Fred — April 22, 2011 @ 10:02 am

  28. I, too, am adding PDF files to our website. Your directions are very clear and concise… Thanks! I have uploaded and inserted the PDF newsletters from my computer. Logged in as admin and after saving all changes, I can access the file (view the post) and it populates in another window with an active link. However, when I log out as admin and enter into the website as “Joe Average”, the link is not there. What’s my dilemma?

    Comments… Thanks!
    Linda

    Comment by Linda Marrone — May 3, 2011 @ 5:43 pm

  29. Hi Linda. I was able to browse the HS website and and found the May Newsletter, (HSWM_May20112.pdf), which was a link in a blog post — I clicked it and was viweing the PDF with no problem. I’m guessing it may be a browser cache issue, (try clearing the cache then reloading the page and see if it’s there). You might also want to try it from another computer, (or have a few friends try from their computers). The first thing to figure out is if it “you”, “your computer”, “certain browsers” or “everyone”… and since I can view the PDF, it’s not “everyone”… FWIW, I was able to access and view the link and the PDF using both FireFox and MS-IE.

    Randy.

    Comment by Randy Harris — May 3, 2011 @ 6:36 pm

  30. Thanks it helps a lot.

    Comment by Nilay — May 31, 2011 @ 12:43 pm

  31. I’ve been wondering how to do this for awhile. Today when a client asked me to add downloadable PDFs to their WP website, I said, “No problem.” Then I immediately hit Google and found your post (#1 search result for ‘how to post downloadable pdf in wordpress’).

    Thanks to you, it was indeed, No Problem!

    Best,
    Nikolas Allen
    BAM! Small Biz Consulting

    Comment by Nikolas Allen — June 29, 2011 @ 6:48 pm

  32. Glad to help — looks like this nearly 3 year old post was worth writing!

    Comment by Randy Harris — June 29, 2011 @ 7:44 pm

  33. thanks for posting this,it may be 3 years old but it is still brilliant :)

    Comment by jane — August 29, 2011 @ 10:58 am

  34. it is opened in the Browser. I need to download it. Please help.

    Comment by Hashini — October 17, 2011 @ 7:56 am

  35. Thank you so much. It worked

    Comment by Nabraj — October 29, 2011 @ 12:29 pm

  36. Hi, Randy.

    I have a simple, two-page PDF document, sitting on my desktop. It is an enrollment form and is necessary for enrolling someone into a specific program I am offering on my site. I need to have a link from my central text to that PDF file. Can you tell me, please, exactly what I must do? I’m a real newbie at all this, and really need to have that document available to anyone who reads my site.

    Comment by Eve Black — October 31, 2011 @ 8:46 am

  37. If there is some part of this article you don’t understand, I’d be happy to answer a specific question — beyond that, all I can say is to follow the steps above.

    Comment by Randy Harris — October 31, 2011 @ 10:23 am

  38. Hi, is it possible to be able to have the PDF open in a new tab/window? I find it’s annoying to have a pdf open in the same window, and then you have to navigate back.

    Thanks!

    Comment by MW — November 18, 2011 @ 4:08 pm

  39. How your browser handles the PDF can be a browser setting. You could try adding target=”_blank” into the tag — but many people’s browsers are set to open PDFs in their own window, or only download the PDF then open it with Acrobat…

    Comment by Randy Harris — November 18, 2011 @ 4:22 pm

  40. Hi

    With respect to #24, where uploaded files are stored, is it possible to have multiple folders for different kinds of content, rather than everything being in one directory?

    Thanks
    Jim

    Comment by Jim Clark — April 2, 2012 @ 8:58 pm

  41. Hi Jim,

    I don’t think you can specify multiple folders from the WP settings.

    The simple solution is to learn how to use FTP client software and use that to upload the files.

    Using FTP software you can manage files on your host in the same way you would on your own computer. You could create as many folders as you like and then “drag and drop” files into those folders from your computer…

    Once you FTP (upload) the file, you would use the “From URL” method to insert a link to the PDF (or other type of media) into your post.

    For FTP client software, I suggest looking into Filezilla — it’s FREE and very easy to use.

    See: http://filezilla-project.org/

    Randy.

    Comment by Randy Harris — April 2, 2012 @ 10:44 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment


Home | Site Map | Links | Email Us

• eCommerce Websites • Shopping Carts • Online Stores •
• Web Design • Photoshop • Logo Design • Custom Programming •
• SEO • SEM • PPC • Display Ads • Solutions! •

Contact: Randy Harris (508) 371-8822
Framingham, MA (USA)

Copyright ©2012 LEXIPIXEL.COM, all rights reserved.
WordPress v.3.3.2 blog designed by LEXIPIXEL