wkhtmltopdf amazon linux won't encode emoji
up vote
1
down vote
favorite
I'm trying to generate a PDF via wkhtmltopdf
in an Amazon Linux
os, everything works fine, but when i try to use emoji on the HTML
, the fonts break and the emoji is displayed as a black box.
Before deploying, i tried locally and it works, locally i have Ubuntu
, so my guess is that i'm missing something (fonts?) in the production (the amazon linux instance) server. I tried to install Google Noto
font but nothing happened. I'll attach 2 screens of the same HTML
page, generated by the same command via wkhtmltopdf
:
Local (Ubuntu):
Production (Amazon Linux):
As you can see, even the font below the broken emoji is not rendered as aspected, i'll add the command i use in both servers:
/my/path/to/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64 --lowquality 'file:///my/path/to/page-test-pdf.html' '/home/user/test.pdf'
Thanks for your time.
encoding wkhtmltopdf emoji amazon-linux
add a comment |
up vote
1
down vote
favorite
I'm trying to generate a PDF via wkhtmltopdf
in an Amazon Linux
os, everything works fine, but when i try to use emoji on the HTML
, the fonts break and the emoji is displayed as a black box.
Before deploying, i tried locally and it works, locally i have Ubuntu
, so my guess is that i'm missing something (fonts?) in the production (the amazon linux instance) server. I tried to install Google Noto
font but nothing happened. I'll attach 2 screens of the same HTML
page, generated by the same command via wkhtmltopdf
:
Local (Ubuntu):
Production (Amazon Linux):
As you can see, even the font below the broken emoji is not rendered as aspected, i'll add the command i use in both servers:
/my/path/to/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64 --lowquality 'file:///my/path/to/page-test-pdf.html' '/home/user/test.pdf'
Thanks for your time.
encoding wkhtmltopdf emoji amazon-linux
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to generate a PDF via wkhtmltopdf
in an Amazon Linux
os, everything works fine, but when i try to use emoji on the HTML
, the fonts break and the emoji is displayed as a black box.
Before deploying, i tried locally and it works, locally i have Ubuntu
, so my guess is that i'm missing something (fonts?) in the production (the amazon linux instance) server. I tried to install Google Noto
font but nothing happened. I'll attach 2 screens of the same HTML
page, generated by the same command via wkhtmltopdf
:
Local (Ubuntu):
Production (Amazon Linux):
As you can see, even the font below the broken emoji is not rendered as aspected, i'll add the command i use in both servers:
/my/path/to/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64 --lowquality 'file:///my/path/to/page-test-pdf.html' '/home/user/test.pdf'
Thanks for your time.
encoding wkhtmltopdf emoji amazon-linux
I'm trying to generate a PDF via wkhtmltopdf
in an Amazon Linux
os, everything works fine, but when i try to use emoji on the HTML
, the fonts break and the emoji is displayed as a black box.
Before deploying, i tried locally and it works, locally i have Ubuntu
, so my guess is that i'm missing something (fonts?) in the production (the amazon linux instance) server. I tried to install Google Noto
font but nothing happened. I'll attach 2 screens of the same HTML
page, generated by the same command via wkhtmltopdf
:
Local (Ubuntu):
Production (Amazon Linux):
As you can see, even the font below the broken emoji is not rendered as aspected, i'll add the command i use in both servers:
/my/path/to/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64 --lowquality 'file:///my/path/to/page-test-pdf.html' '/home/user/test.pdf'
Thanks for your time.
encoding wkhtmltopdf emoji amazon-linux
encoding wkhtmltopdf emoji amazon-linux
asked Nov 21 at 9:27
Gumma Mocciaro
894718
894718
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
If you are running PHP 7.x, I have been having problems with the wkhtmltopdf extension within a dockerized image. We were trying to use font awesome and the text just did not render correctly. There were some compilation issues that caused this.
The problem was resolved when using the following binary https://github.com/madnight/docker-alpine-wkhtmltopdf
Hope this helps you forward.
EDIT: You will also have to have all fonts used installed as system fonts iirc otherwise wkhtmltopdf will refuse to work as it cannot find the font
unfortunately i need to use emoji because i need to generate a report for some push notifications (containing emoji), i actually refuse to map every emoji and replace it with something else, i think i need to install the right fonts in the server, moreover, i'll try the binary you linked instead the one i got from composer (i don't use docker in this project, but i guess this will not be a problem), thanks!
– Gumma Mocciaro
Nov 23 at 9:41
I tried to use that binary but unfortunately is for 32bit OS, while i have 64Bit. I also tried to install the fonts in the server but it didn't help either. I wrote in the project's github so i'll just wait and hope
– Gumma Mocciaro
Nov 23 at 10:51
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
If you are running PHP 7.x, I have been having problems with the wkhtmltopdf extension within a dockerized image. We were trying to use font awesome and the text just did not render correctly. There were some compilation issues that caused this.
The problem was resolved when using the following binary https://github.com/madnight/docker-alpine-wkhtmltopdf
Hope this helps you forward.
EDIT: You will also have to have all fonts used installed as system fonts iirc otherwise wkhtmltopdf will refuse to work as it cannot find the font
unfortunately i need to use emoji because i need to generate a report for some push notifications (containing emoji), i actually refuse to map every emoji and replace it with something else, i think i need to install the right fonts in the server, moreover, i'll try the binary you linked instead the one i got from composer (i don't use docker in this project, but i guess this will not be a problem), thanks!
– Gumma Mocciaro
Nov 23 at 9:41
I tried to use that binary but unfortunately is for 32bit OS, while i have 64Bit. I also tried to install the fonts in the server but it didn't help either. I wrote in the project's github so i'll just wait and hope
– Gumma Mocciaro
Nov 23 at 10:51
add a comment |
up vote
1
down vote
If you are running PHP 7.x, I have been having problems with the wkhtmltopdf extension within a dockerized image. We were trying to use font awesome and the text just did not render correctly. There were some compilation issues that caused this.
The problem was resolved when using the following binary https://github.com/madnight/docker-alpine-wkhtmltopdf
Hope this helps you forward.
EDIT: You will also have to have all fonts used installed as system fonts iirc otherwise wkhtmltopdf will refuse to work as it cannot find the font
unfortunately i need to use emoji because i need to generate a report for some push notifications (containing emoji), i actually refuse to map every emoji and replace it with something else, i think i need to install the right fonts in the server, moreover, i'll try the binary you linked instead the one i got from composer (i don't use docker in this project, but i guess this will not be a problem), thanks!
– Gumma Mocciaro
Nov 23 at 9:41
I tried to use that binary but unfortunately is for 32bit OS, while i have 64Bit. I also tried to install the fonts in the server but it didn't help either. I wrote in the project's github so i'll just wait and hope
– Gumma Mocciaro
Nov 23 at 10:51
add a comment |
up vote
1
down vote
up vote
1
down vote
If you are running PHP 7.x, I have been having problems with the wkhtmltopdf extension within a dockerized image. We were trying to use font awesome and the text just did not render correctly. There were some compilation issues that caused this.
The problem was resolved when using the following binary https://github.com/madnight/docker-alpine-wkhtmltopdf
Hope this helps you forward.
EDIT: You will also have to have all fonts used installed as system fonts iirc otherwise wkhtmltopdf will refuse to work as it cannot find the font
If you are running PHP 7.x, I have been having problems with the wkhtmltopdf extension within a dockerized image. We were trying to use font awesome and the text just did not render correctly. There were some compilation issues that caused this.
The problem was resolved when using the following binary https://github.com/madnight/docker-alpine-wkhtmltopdf
Hope this helps you forward.
EDIT: You will also have to have all fonts used installed as system fonts iirc otherwise wkhtmltopdf will refuse to work as it cannot find the font
answered Nov 22 at 19:05
Matt Smeets
310213
310213
unfortunately i need to use emoji because i need to generate a report for some push notifications (containing emoji), i actually refuse to map every emoji and replace it with something else, i think i need to install the right fonts in the server, moreover, i'll try the binary you linked instead the one i got from composer (i don't use docker in this project, but i guess this will not be a problem), thanks!
– Gumma Mocciaro
Nov 23 at 9:41
I tried to use that binary but unfortunately is for 32bit OS, while i have 64Bit. I also tried to install the fonts in the server but it didn't help either. I wrote in the project's github so i'll just wait and hope
– Gumma Mocciaro
Nov 23 at 10:51
add a comment |
unfortunately i need to use emoji because i need to generate a report for some push notifications (containing emoji), i actually refuse to map every emoji and replace it with something else, i think i need to install the right fonts in the server, moreover, i'll try the binary you linked instead the one i got from composer (i don't use docker in this project, but i guess this will not be a problem), thanks!
– Gumma Mocciaro
Nov 23 at 9:41
I tried to use that binary but unfortunately is for 32bit OS, while i have 64Bit. I also tried to install the fonts in the server but it didn't help either. I wrote in the project's github so i'll just wait and hope
– Gumma Mocciaro
Nov 23 at 10:51
unfortunately i need to use emoji because i need to generate a report for some push notifications (containing emoji), i actually refuse to map every emoji and replace it with something else, i think i need to install the right fonts in the server, moreover, i'll try the binary you linked instead the one i got from composer (i don't use docker in this project, but i guess this will not be a problem), thanks!
– Gumma Mocciaro
Nov 23 at 9:41
unfortunately i need to use emoji because i need to generate a report for some push notifications (containing emoji), i actually refuse to map every emoji and replace it with something else, i think i need to install the right fonts in the server, moreover, i'll try the binary you linked instead the one i got from composer (i don't use docker in this project, but i guess this will not be a problem), thanks!
– Gumma Mocciaro
Nov 23 at 9:41
I tried to use that binary but unfortunately is for 32bit OS, while i have 64Bit. I also tried to install the fonts in the server but it didn't help either. I wrote in the project's github so i'll just wait and hope
– Gumma Mocciaro
Nov 23 at 10:51
I tried to use that binary but unfortunately is for 32bit OS, while i have 64Bit. I also tried to install the fonts in the server but it didn't help either. I wrote in the project's github so i'll just wait and hope
– Gumma Mocciaro
Nov 23 at 10:51
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53408891%2fwkhtmltopdf-amazon-linux-wont-encode-emoji%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown