libHaru is a library for generating PDF files. It supports generating PDF files with lines, text, images, outlines, text annotations, and link annotations, compressing a document with deflate-decode, embedding PNG and JPEG images, embedding Type1 and TrueType fonts, creating encrypted PDF files, using various character sets, using CJK fonts and encodings, and basic U3D usage.
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.