resume-cli icon indicating copy to clipboard operation
resume-cli copied to clipboard

PDF Export - picture does not render

Open kmcquade opened this issue 4 years ago • 1 comments

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

  • Resume:

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

  • Screenshot:

image

kmcquade avatar Mar 23 '21 01:03 kmcquade

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

michaellee8 avatar Jun 18 '21 09:06 michaellee8