{"action":"created","issue":{"url":"https://api.github.com/repos/vim-pandoc/vim-pandoc/issues/116","labels_url":"https://api.github.com/repos/vim-pandoc/vim-pandoc/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/vim-pandoc/vim-pandoc/issues/116/comments","events_url":"https://api.github.com/repos/vim-pandoc/vim-pandoc/issues/116/events","html_url":"https://github.com/vim-pandoc/vim-pandoc/issues/116","id":56413432,"number":116,"title":"`:Pandoc pdf` doesn't work","user":{"login":"lyeoh","id":6475808,"avatar_url":"https://avatars.githubusercontent.com/u/6475808?v=3","gravatar_id":"","url":"https://api.github.com/users/lyeoh","html_url":"https://github.com/lyeoh","followers_url":"https://api.github.com/users/lyeoh/followers","following_url":"https://api.github.com/users/lyeoh/following{/other_user}","gists_url":"https://api.github.com/users/lyeoh/gists{/gist_id}","starred_url":"https://api.github.com/users/lyeoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyeoh/subscriptions","organizations_url":"https://api.github.com/users/lyeoh/orgs","repos_url":"https://api.github.com/users/lyeoh/repos","events_url":"https://api.github.com/users/lyeoh/events{/privacy}","received_events_url":"https://api.github.com/users/lyeoh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-03T17:59:21Z","updated_at":"2015-02-04T23:11:31Z","closed_at":null,"body":"`:Pandoc pdf` tries to run `pandoc -t html -o \"FILENAME.html\" \"pdf\" \"FILENAME.page\"`, giving error message\r\n\r\n> pandoc: pdf: openFile: does not exist (No such file or directory)\r\n\r\nThe problem seems to stem from the function [`get_output_formats_table()`](https://github.com/vim-pandoc/vim-pandoc/blob/master/pythonx/vim_pandoc/command.py#L62) in [`vim-pandoc/pythonx/vim_pandoc/command.py`](https://github.com/vim-pandoc/vim-pandoc/blob/master/pythonx/vim_pandoc/command.py).\r\n\r\nIt calls `PandocHelpParser._get_output_formats()`, which calls `PandocHelpParser._get_formats()`, which calls `pandoc --help`. `get_output_formats_table()` expects the substring 'pdf' after 'Output formats:' in `pandoc --help`, whereas [it is not there](https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc.hs#L249).\r\n\r\nFor a dirty fix, insert `table[\"pdf\"] = \"pdf\"` before returning `table` in `get_output_formats_table()`."},"comment":{"url":"https://api.github.com/repos/vim-pandoc/vim-pandoc/issues/comments/72960573","html_url":"https://github.com/vim-pandoc/vim-pandoc/issues/116#issuecomment-72960573","issue_url":"https://api.github.com/repos/vim-pandoc/vim-pandoc/issues/116","id":72960573,"user":{"login":"lyeoh","id":6475808,"avatar_url":"https://avatars.githubusercontent.com/u/6475808?v=3","gravatar_id":"","url":"https://api.github.com/users/lyeoh","html_url":"https://github.com/lyeoh","followers_url":"https://api.github.com/users/lyeoh/followers","following_url":"https://api.github.com/users/lyeoh/following{/other_user}","gists_url":"https://api.github.com/users/lyeoh/gists{/gist_id}","starred_url":"https://api.github.com/users/lyeoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyeoh/subscriptions","organizations_url":"https://api.github.com/users/lyeoh/orgs","repos_url":"https://api.github.com/users/lyeoh/repos","events_url":"https://api.github.com/users/lyeoh/events{/privacy}","received_events_url":"https://api.github.com/users/lyeoh/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T23:11:31Z","updated_at":"2015-02-04T23:11:31Z","body":"I was actually using an old version bundled with `gitit`.\r\n\r\nNow that you mention it, I must have misread the source in master. It [explicitly includes](https://github.com/jgm/pandoc/blob/master/pandoc.hs#L913) `pdf*` in its `--help` output, and has since [2013](https://github.com/jgm/pandoc/commit/4edc97a921d011489375eac62519fe3fc24f7609). I'm afraid I was just using a very old version of `pandoc`!"}}