Basic working version: can generate and decode PDFs