I'm trying to find a way to generate PDFs with layers (officially called "Optional Content Groups"), but the only method that I've found so far is with PDFlib, which is quite expensive.
Does anyone know of another way to do this? PHP would be preferred, but other languages that can be run reasonably on a server (e.g. Python, Ruby) might work alright too. I've been trying to find another option for a while now, so any help would be greatly appreciated.