This demo uses Html2Canvas.js to render HTML.
Instead of using an HTML canvas however, a canvas wrapper using jsPDF is substituted. The context2d provided by the wrapper calls native PDF rendering methods.
A PDF of this page will be inserted into the right margin.
red rgb(0,255,0) rgba(0,0,0,.5) #0000FF #0FF