You are thinking of some real overkill. The easiest way to make a calculator is JavaScript, just because it is already a calculator, already implemented, essentially, with just one function,
eval
. Please see my implementation and the article about it:
JavaScript Calculator[
^].
PDF: I could not possibly think of something uglier and more useless, but, for example, you could use jsPDF:
http://mrrio.github.io/jsPDF/[
^].
—SA