Neat QR Trick for Printing

While watching an episode of Star Trek: The Next Generation (Season 3) on Netflix, I realized a great method to implement QR codes to connect offline content to its online material.

This method is implemented in 3 steps:


  1. Put this code in your footer files (PHP only):
    echo "";

    (this uses Google's API to automatically generate the QR code for each page. If you are using ASP, insert your own code)


  2. Put this in your main CSS file:
    #print_qr{ display: none; text-align: center; }
  3. Put this in your Print CSS file:
    #print_qr{ display: block }
    and if you haven't done so already, put a print-specific meta tag to enable print-specific CSS
And that's it! Now, when your users print your pages (hopefully they go green and won't print it), they can get direct access to the page by scanning the QR code instead of having to worry about typing in the URL, if it is even on the page You are free to change anything in the provided code. I'm not ©'ing the code, just providing a concept to help others.


Tags:#qr #print #css #php