Add PDF support and chunked HTML output

pdf is locked behind a profile