Converting to a full jsPDF-style plugin