• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Download Monitor & Manager Plugin

Simple Download Monitor & Manager for WordPress

  • Home
  • Documentation
  • Addons/Extensions
  • Login
    • Sign In
    • Edit Profile
    • My Downloads
  • Support
    • Tutorials
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration
  • Contact Us
You are here: Home / Topics / forbid browser to display a PDF file download

[Resolved] forbid browser to display a PDF file download

· ·

WordPress Download Monitor Plugin › Forums › Download Monitor Plugin Forum › forbid browser to display a PDF file download

Tagged: download pdf not diplay it

  • This topic has 1 reply, 1 voice, and was last updated 6 years, 6 months ago by olivier.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • November 3, 2018 at 6:06 pm #830
    olivier
    Participant

    I’m using un button (not the sdm_download button feature but a theme Avada button) using that link:
    ?smd_process_download=1&download_id=xxxxx

    All browsers are displaying the PDF instead of the download box. Is there a way to force the browser to not open the file?

    Thanks for any help

    November 4, 2018 at 11:43 pm #833
    olivier
    Participant

    Solution found:

    put an .htaccess file inside the folder containing the pdf to be downloaded using sdm_download plugin. Files offered to download must be in their own specific folder.

    Content of the .htaccess is:

    <FilesMatch “\.pdf$”>
    ForceType application/octet-stream
    Header set Content-Disposition attachment
    </FilesMatch>

    works like a charm!

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

Primary Sidebar

Featured Addons

  • Squeeze Form Addon
  • Hidden Downloads Addon
  • Amazon S3 Integration

Support Links

  • Support Forum

Search

Featured Plugin

WP Express Checkout Plugin

Start managing and tracking your file downloads with the simple download monitor plugin. Download Now

Copyright © 2025 | Simple Download Monitor | A member of the Tips and Tricks HQ family.