resume-cli: pdf rendering is broken

resume.json passes all tests then I am given the choice of .html or .pdf. Choosing the latter creates a broken file with the error message,

Unable to open :/file/foo.pdf File type HTML document (text/html) is not supported

The .html version works however when I try to print it to convert to pdf and then doc one of the ‘work’ fields and ‘awards’ fields shifts to the left which is not seen on the rendered html version making it useless.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 8
  • Comments: 17 (5 by maintainers)

Commits related to this issue

Most upvoted comments

For those looking for a work-around, this was successful using Ubuntu 15.10:

  1. terminal: sudo apt-get install wkhtmltopdf
  2. resume export resume-paper.html -t Paper
  3. terminal: wkhtmltopdf resume-paper.html test.pdf

There seems to be a lot of echo system built around jsonresume, which made me think this looked like a successful project, so dived in and spent a few hours on it. Then finally attempted to export pdf via the CLI and it just doesn’t work. It may be helpful for new comers if there was a note on the readme that this core functionality is broken currently, just so that new comers don’t think this is a complete working project.

One problem is that usually when people are in a hurry to stream-line CV building, they don’t have much time for anything else, other than job hunting. Which means that consumers just consume and don’t have the time to contribute. This is my personal experience anyway, which is sad, as this project has great potential I think. Keep up the good work core contributors!

Using @kneeki suggestion is helpful, but as @asymmetric pointed out many themes lose their formatting, thus making wkhtmltopdf not a perfect solution. Are there any other html to pdf converters that maintain source formatting? Are there any other workflows people would be willing to share to format a json resume as a sendable document?

The workaround posted by @kneeki doesn’t always produce the same output as the HTML unfortunately, e.g. for the “flat” theme.

I too can reproduce this.