We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36762
    • 45 Posts
    I'm looking for a Google Cloud Print system for a web site. Has MODx worked on such a feature for it's repository yet? I didn't find one upon searching.

    This discusses it but full on programming is beyond me and I think it may need to be integrated somehow with a PDF engine. Not sure.

    http://code.google.com/apis/cloudprint/docs/gadget.html
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Hello,

      You shouldn't need a custom extra to make this function. You just need to add two blocks of code to your template.

      In the header put the follow:

      <script src="http://www.google.com/cloudprint/client/cpgadget.js">
      </script>
      <script defer="defer">
      	var gadget = new cloudprint.Gadget();
      	gadget.setPrintButton(cloudprint.Gadget.createDefaultPrintButton("print_button_container"));
      	gadget.setPrintDocument("url", "[document title]", "[document URL]");
      </script>


      Then anywhere you want a print button put:

      <div id="print_ button_container"> </div>


      Nothing special required.
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting