jsonresume / resume-cli

CLI tool to easily setup a new resume 📑
https://jsonresume.org
MIT License
4.56k stars 389 forks source link

PDF Export - picture does not render #541

Open kmcquade opened 3 years ago

kmcquade commented 3 years ago

It looks like resume-cli is not rendering the picture - whether it is using a remote URL or a local path. See example below.

https://gist.github.com/kmcquade/03fd06e5cd295df4d31cfb9c41dc77e8

image

michaellee8 commented 3 years ago

I understands the problem now, if you import any pictures or icons in a relative path, pdf generation is going to fail since resume-cli just use base64 encoded html content as the url https://github.com/jsonresume/resume-cli/blob/master/lib/export-resume.js#L77. Due to the way that different theme works, there are no way to fix it now since it is not possible for resume-cli to know where are those asset stored. The solution is to generate pdf via puppeteer by urself.

You may want to see my scripts here https://github.com/michaellee8/michaellee8/blob/master/scripts/resume/index.js