Open benonymus opened 3 years ago
Did someone solved this problem?
{:error, {:generator_failed, "Loading page (1/2)\n[> ] 0%\r[==============================> ] 50%\r"}}
Hey, I am not sure about the error, but you might want to check out chromic_pdf, I found it easier to work with than wkhtmltopdf based generators.
Get Outlook for iOShttps://aka.ms/o0ukef
From: zivaskovic @.> Sent: Friday, February 11, 2022 4:47:02 PM To: gutschilla/elixir-pdf-generator @.> Cc: Bence Janos Toth @.>; Author @.> Subject: Re: [gutschilla/elixir-pdf-generator] Issue on wkhtmltopdf 0.12.6 (#79)
Did someone solved this problem?
{:error, {:generator_failed, "Loading page (1/2)\n[> ] 0%\r[==============================> ] 50%\r"}}
— Reply to this email directly, view it on GitHubhttps://github.com/gutschilla/elixir-pdf-generator/issues/79#issuecomment-1036030534, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADMN6Q77ZHZI4S6ALTGZDMTU2TLJNANCNFSM4WVZP6QQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>
apk add ttf-liberation
On Alpine linux helped me. Missing fonts gave segfault.
Missing fonts gave segfault.
I was getting the same opaque error @zivaskovic mentions and adding the font to my docker file fixed the issue for me as well.
Hey, I updated to wkhtmltopdf 0.12.6 and there seems to be this problem: https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4926 or this https://stackoverflow.com/questions/62315246/wkhtmltopdf-0-12-6-warning-blocked-access-to-file
The solution would be to pass the --enable-local-file-access flag, I tried to pass it as shell params but doesn't seem to work.
How should I pass it?
I am getting after some tweaking:
The original full error is the following:
I fixed the XDG_RUNTIME_DIR part by setting it as an env var, and i fixed the 301 by not writing images to files and loading them, but rather passing them as base64 to the template.
The last piece is the error on the top, that I think the flag could fix, the flag might have fixed it all.