We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25287
    • 81 Posts
    I’m very new to modx. Am wondering if it is possible to insert a pdf into a web page. The idea is to have a weekly newsletter (that’s produced in MS Publisher) exported to pdf then loaded onto a web page. Can modx do this?

    Apologies if I use the wrong terminology. I’m considering moving from wordress & am still getting my head around modx

    Thanks for any help.

    Rob
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Welcome to the forums, and welcome to MODx!

      Can you clarify -- do you want the link to show up in the page? Or the entire PDF?

      The link is certainly possible -- what version of MODx are you using? There are different abilities depending on the version.

      If you want the contents to show up... hmm... that’s more difficult. I wrote some Perl scripts that de-constructed PDFs to extract text from them. If you link directly to a pdf file, I’m not sure if that will trigger a download in your browser, or if it will load the PDF inside of the browser.

      What other requirements are there?
        • 25287
        • 81 Posts
        Thanks for the reply.
        What I’m wanting to do is have the pdf appear in the browser, either as part of the page, or as the full page. Then visitors have the option of downloading the pdf.

        I’m using version 1.0.0

        I’m hoping this would be quite simple to do.

        thanks

        Rob
          • 9207 ☆ A M B ☆
          • 2,475 Posts
          Yeah, just put the link to the pdf into any page and when the user clicks on the link, the pdf will open inside of the browser:

          <a href="/location/of/your.pdf">Click Here</a>


          There’s nothing magical about this... it’s just simple HTML. Now if you want MODx to dynamically list files in a certain directory or something like that, then maybe you should look at the @DIRECTORY binding or see if you can use Web Links (instead of standard documents) to link to files -- I know you can do this in Revo, but not sure about Evolution...
            • 25287
            • 81 Posts
            Thanks Everett. I thought it would be simple - just couldn’t find an answer.
            Work has been hectic, hence the delayed reply.
            Rob