hpdf.js is a scrip to create PDFs in your browser (it is a port of libharu). Existing projects with the same goal lack a lot of features (e.g. custom fonts). hpdf.js supports custom fonts (Type1 and TTF), PNG, JPEG, and RAW images, password protection, text and link annotations, outlines, drawing function (lines, cycles etc.), encoding support, and more.