resume-cli: PDF output currently broken
Currently, for me, all PDF outputs contain just this text:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
html, body, iframe { margin: 0; padding: 0; height: 100%; }
iframe { display: block; width: 100%; border: none; }
</style>
<title>Application Error</title>
</head>
<body>
<iframe src="//s3.amazonaws.com/heroku_pages/error.html">
<p>Application Error</p>
</iframe>
</body>
</html
This is regardless of the theme I use, and for a JSON document that hasn’t changed for days, and was working just a couple of hours ago.
I’m guessing whatever online service jsonresume-cli uses in the background for PDF conversion is currently broken, but I’m not sure where else to report it.
Thanks.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 49 (18 by maintainers)
I run https://www.api2pdf.com and I would be happy to give you guys free credit so that you can re-enable your pdf export feature. Just let me know.
For those looking for a workaround, open your CV in google chrome and press Ctrl + P for “print”, and then set “Save as PDF” as the destination. Works great!
Or maybe give another free API a try? http://www.html2pdfrocket.com/ for example.
If anyone is curious I have made a little build process with “npm scripts”. It first builds as html file with
resume-cli
, then a pdf withwkhtmltopdf
, and finally a png withimagemagick
(for the README.md file). I’m on OSX and the install of imagemagick and wkhtmltopdf is very simple… https://github.com/howardroark/resumeI really like
wkhtmltopdf
because it preserves links and offers a nice looking PDF assuming the template has a good responsive layout.In theory a binary for each of those two tools could be downloaded to match the architecture and used as an npm module.
In the meantime, you can mess with this script + node module I found that may help you.
npm install html-pdf
node html2pdf.js <path-and-filename-of-prev-generated-html-output-in-step-one> myresume.pdf
options
object to get the outputted PDF to look nice. YMMV.@thomasdavis you mention pdfcrowd so what about adding the ability to provide a custom API token using the cli? Looking at pdfcrowd, they offer a trial with 100 tokens so each of us can just register and get those 100 conversions for ourselves.
Aw man, I was creating my first json-resume for my girlfriend, and now I can’t export to pdf and show her
@howardroark I tried to run
wkhtmltopdf
, but I got a bad looking pdf: resume.pdfAny hint on how to produce a correct output? Note that I got similar bad-looking output if I open the html file in a browser and then print it. The html itself is rendered well in firefox and chrome.
Would it make sense to do PDF conversion locally instead of using a paid service?
I’m having an issue with pdf export
The command
resume export resume.pdf
seems to work correctly, and even ‘creates’ a pdf file. When I try to open it, I get the following Documen Viewer errorUnable to open document
File type HTML document (text/html) is not supported
Nothing else on console or anything 😕