-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(export): Adjust createPdf
for the puppeteer^1.11.0
API.
#294
Conversation
Per puppeteer/puppeteer#728 and https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagesetcontenthtml-options. The latest `puppeteer` seems to have broken PDF generation (with the [`page.goto`](puppeteer/puppeteer#728 (comment)) workaround), at least locally for me both here in `resume-cli` and in [`jsonresume-theme-randytarampi`](https://www.npmjs.com/package/jsonresume-theme-randytarampi).
Perhaps @MarcLoupias could review this? Per @jphellemons' and @hannodrefke's issues in #291 (comment). |
It's no problem if I need to review it myself, however I could use some guidance.
I just ran Also ran edit I have used npm link and tried to run and if I force (
|
Hm. Those steps look reasonable. The following works for me though. # Set things up
git clone git+ssh://github.com/randytarampi/resume-cli.git
cd resume-cli
git checkout puppeteer-v1.11.0
npm install
# Copy over your `resume.json` here...
# cp ../me/packages/jsonresume-theme/resume.json .
# Generate a `resume.pdf` using `jsonresume-theme-flat`
./index.js export resume.pdf --force -f pdf --theme flat
# Generate a PDF using a custom theme, like `jsonresume-theme-elegant`
npm install jsonresume-theme-elegant
./index.js export resume.pdf --force -f pdf --theme elegant |
I have added |
Are you running the commands from the What's your system environment like? It works fine for me on OSX, and on my Trusty Travis boxes. What version of Can you try reinstalling your cd resume-cli
git checkout puppeteer-v1.11.0
# Also remember to blow away the `package-lock`
rm -rf node_modules package-lock.json
npm install
# Sanity check that we actually have the right `puppeteer`
cat node_modules/puppeteer/package.json # Check the `version` value.
node ./index.js export resume.pdf --force -f pdf --theme flat I really don't know how else to troubleshoot this one. I would add some logging here since it looks like we're just swallowing the |
I have 8 in my
edit I "fixed" the callback message in the |
Installed this using |
@jphellemons can you revert to using the original (and insecure) Looks like you've upgraded I wouldn't worry too much about those insecure dependencies really – if you really wanted to, I'd just upgrade |
Any chance this gets merged anytime soon? We'd love to see a new release that includes this fix and would make the project usable! Thanks! |
Hi all, I looked into the situation and noticed that the data url was unencoded. This generally poses a problem for html content. See #333 for a fix that does not require any bump in puppeteer. |
Closed 'cause #333 is the actual solution here. |
The latest
puppeteer
seems to have broken PDF generation (with thepage.goto
workaround), at least locally for me both here inresume-cli
and in@randy.tarampi/resume
(which offers a similar PDFing functionality through@randy.tarampi/printables
).Per puppeteer/puppeteer#728 and https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagesetcontenthtml-options.
Also see the related change (including tests) at randytarampi/me@cb4dffb#diff-fbc2dab1d717f6eb0e4d2620c7fa7f03R21.