Link to View PDf file into browser instead of downloading

    • Daniele Cavazzin
      Participant
      # 2 years, 3 months ago

      Hi,
      i would like to create a link to view pdf instead of download it.
      I set “action” to view but not works.
      How can I do that?

      ID, reset($attached_files),'view'); ?>
    • Daniele Cavazzin
      Participant
    • Thomas
      Keymaster
      # 2 years, 3 months ago

      Hi,

      The Enhanced Files add-on is actually managing that.

      It adds a field where you can add some file extensions to open inline. If the browser is capable of that, the file (PDF, MP3, MP4, etc..) will be opened in your browser, else, it will be downloaded.

      If you add another button, in most cases, you’ll just get two buttons that will just download the file, because your user can browse your site using safari, opera or some other ligthweight or mobile or even outdated browsers that do not include PDF viewers and others.

      Do not hesitate if you need more explanations.

      Regards.

      Want to help WP Customer Area? It only takes few seconds!
      Rate & review the plugin on WordPress.org 🙂

Viewing 2 reply threads

The topic ‘Link to View PDf file into browser instead of downloading’ is closed to new replies.