wkhtmltopdf displaying text as blocks
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
We're using wkhtmltopdf in a web project (nodejs/compoundjs). We've gotten it working how we wanted on our machines (using the --use-xserver
switch). However, when I try to run this on our Ubuntu server 12.04 (without the ubuntu-desktop package), the PDF cannot use the switch. When we disable the switch, the PDF displays any characters as blocks (image below).
How do I resolve this without installing ubuntu-desktop and running x server?
I've found liberation fonts, which installing ttf-liberation and fonts-liberation did not help. And urw-fonts, but I have yet to find an Ubuntu equivalent.
EDIT: It just hit me, this doesn't matter if I'm on the server or not. On my development machine (Ubuntu 13.04 desktop), I can run the following, which produces the same blocks:
wkhtmltopdf http://google.com google1.pdf
While this prints out the pdf properly:
wkhtmltopdf --use-xserver http://google.com google2.pdf
My version of wkhtmltopdf is 0.12.0.
fonts pdf wkhtmltopdf
add a comment |
We're using wkhtmltopdf in a web project (nodejs/compoundjs). We've gotten it working how we wanted on our machines (using the --use-xserver
switch). However, when I try to run this on our Ubuntu server 12.04 (without the ubuntu-desktop package), the PDF cannot use the switch. When we disable the switch, the PDF displays any characters as blocks (image below).
How do I resolve this without installing ubuntu-desktop and running x server?
I've found liberation fonts, which installing ttf-liberation and fonts-liberation did not help. And urw-fonts, but I have yet to find an Ubuntu equivalent.
EDIT: It just hit me, this doesn't matter if I'm on the server or not. On my development machine (Ubuntu 13.04 desktop), I can run the following, which produces the same blocks:
wkhtmltopdf http://google.com google1.pdf
While this prints out the pdf properly:
wkhtmltopdf --use-xserver http://google.com google2.pdf
My version of wkhtmltopdf is 0.12.0.
fonts pdf wkhtmltopdf
I've just learned that PhantomJS also supports capturing to PDF, if that helps at all.
– ændrük
Nov 8 '13 at 21:42
@ændrük, Thanks for the suggestion. I've heard of it as well, but we've used wkhtmltopdf in other projects (.NET/Windows Server) and already have this implemented to how we like it.
– making3
Nov 8 '13 at 22:08
add a comment |
We're using wkhtmltopdf in a web project (nodejs/compoundjs). We've gotten it working how we wanted on our machines (using the --use-xserver
switch). However, when I try to run this on our Ubuntu server 12.04 (without the ubuntu-desktop package), the PDF cannot use the switch. When we disable the switch, the PDF displays any characters as blocks (image below).
How do I resolve this without installing ubuntu-desktop and running x server?
I've found liberation fonts, which installing ttf-liberation and fonts-liberation did not help. And urw-fonts, but I have yet to find an Ubuntu equivalent.
EDIT: It just hit me, this doesn't matter if I'm on the server or not. On my development machine (Ubuntu 13.04 desktop), I can run the following, which produces the same blocks:
wkhtmltopdf http://google.com google1.pdf
While this prints out the pdf properly:
wkhtmltopdf --use-xserver http://google.com google2.pdf
My version of wkhtmltopdf is 0.12.0.
fonts pdf wkhtmltopdf
We're using wkhtmltopdf in a web project (nodejs/compoundjs). We've gotten it working how we wanted on our machines (using the --use-xserver
switch). However, when I try to run this on our Ubuntu server 12.04 (without the ubuntu-desktop package), the PDF cannot use the switch. When we disable the switch, the PDF displays any characters as blocks (image below).
How do I resolve this without installing ubuntu-desktop and running x server?
I've found liberation fonts, which installing ttf-liberation and fonts-liberation did not help. And urw-fonts, but I have yet to find an Ubuntu equivalent.
EDIT: It just hit me, this doesn't matter if I'm on the server or not. On my development machine (Ubuntu 13.04 desktop), I can run the following, which produces the same blocks:
wkhtmltopdf http://google.com google1.pdf
While this prints out the pdf properly:
wkhtmltopdf --use-xserver http://google.com google2.pdf
My version of wkhtmltopdf is 0.12.0.
fonts pdf wkhtmltopdf
fonts pdf wkhtmltopdf
edited Sep 25 '17 at 8:01
Martin Thoma
7,001165275
7,001165275
asked Oct 23 '13 at 18:56
making3making3
12126
12126
I've just learned that PhantomJS also supports capturing to PDF, if that helps at all.
– ændrük
Nov 8 '13 at 21:42
@ændrük, Thanks for the suggestion. I've heard of it as well, but we've used wkhtmltopdf in other projects (.NET/Windows Server) and already have this implemented to how we like it.
– making3
Nov 8 '13 at 22:08
add a comment |
I've just learned that PhantomJS also supports capturing to PDF, if that helps at all.
– ændrük
Nov 8 '13 at 21:42
@ændrük, Thanks for the suggestion. I've heard of it as well, but we've used wkhtmltopdf in other projects (.NET/Windows Server) and already have this implemented to how we like it.
– making3
Nov 8 '13 at 22:08
I've just learned that PhantomJS also supports capturing to PDF, if that helps at all.
– ændrük
Nov 8 '13 at 21:42
I've just learned that PhantomJS also supports capturing to PDF, if that helps at all.
– ændrük
Nov 8 '13 at 21:42
@ændrük, Thanks for the suggestion. I've heard of it as well, but we've used wkhtmltopdf in other projects (.NET/Windows Server) and already have this implemented to how we like it.
– making3
Nov 8 '13 at 22:08
@ændrük, Thanks for the suggestion. I've heard of it as well, but we've used wkhtmltopdf in other projects (.NET/Windows Server) and already have this implemented to how we like it.
– making3
Nov 8 '13 at 22:08
add a comment |
2 Answers
2
active
oldest
votes
This bug report suggests that wkhtmltopdf just needs whatever xorg-x11-fonts
provides:
$ wajig list-installed xfonts
xfonts-base
xfonts-encodings
xfonts-mathml
xfonts-scalable
xfonts-utils
So try installing those. Note that you'll pull in several X dependencies, but not the server itself.
I have all of these xfonts on my dev machine and it gives the same results. I'm looking into trying to find the correct xfonts package through the package manager.
– making3
Nov 8 '13 at 21:50
add a comment |
In fact wkhtmltopdf on linux requires quite a lot of Xorg as mentioned on the project page:
(Linux) No longer requires an XServer to be running (however the X11 client libs must be installed)
You should install the client libs as well.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2faskubuntu.com%2fquestions%2f364590%2fwkhtmltopdf-displaying-text-as-blocks%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
This bug report suggests that wkhtmltopdf just needs whatever xorg-x11-fonts
provides:
$ wajig list-installed xfonts
xfonts-base
xfonts-encodings
xfonts-mathml
xfonts-scalable
xfonts-utils
So try installing those. Note that you'll pull in several X dependencies, but not the server itself.
I have all of these xfonts on my dev machine and it gives the same results. I'm looking into trying to find the correct xfonts package through the package manager.
– making3
Nov 8 '13 at 21:50
add a comment |
This bug report suggests that wkhtmltopdf just needs whatever xorg-x11-fonts
provides:
$ wajig list-installed xfonts
xfonts-base
xfonts-encodings
xfonts-mathml
xfonts-scalable
xfonts-utils
So try installing those. Note that you'll pull in several X dependencies, but not the server itself.
I have all of these xfonts on my dev machine and it gives the same results. I'm looking into trying to find the correct xfonts package through the package manager.
– making3
Nov 8 '13 at 21:50
add a comment |
This bug report suggests that wkhtmltopdf just needs whatever xorg-x11-fonts
provides:
$ wajig list-installed xfonts
xfonts-base
xfonts-encodings
xfonts-mathml
xfonts-scalable
xfonts-utils
So try installing those. Note that you'll pull in several X dependencies, but not the server itself.
This bug report suggests that wkhtmltopdf just needs whatever xorg-x11-fonts
provides:
$ wajig list-installed xfonts
xfonts-base
xfonts-encodings
xfonts-mathml
xfonts-scalable
xfonts-utils
So try installing those. Note that you'll pull in several X dependencies, but not the server itself.
edited Apr 13 '17 at 12:23
Community♦
1
1
answered Nov 8 '13 at 21:30
ændrükændrük
42.4k61195343
42.4k61195343
I have all of these xfonts on my dev machine and it gives the same results. I'm looking into trying to find the correct xfonts package through the package manager.
– making3
Nov 8 '13 at 21:50
add a comment |
I have all of these xfonts on my dev machine and it gives the same results. I'm looking into trying to find the correct xfonts package through the package manager.
– making3
Nov 8 '13 at 21:50
I have all of these xfonts on my dev machine and it gives the same results. I'm looking into trying to find the correct xfonts package through the package manager.
– making3
Nov 8 '13 at 21:50
I have all of these xfonts on my dev machine and it gives the same results. I'm looking into trying to find the correct xfonts package through the package manager.
– making3
Nov 8 '13 at 21:50
add a comment |
In fact wkhtmltopdf on linux requires quite a lot of Xorg as mentioned on the project page:
(Linux) No longer requires an XServer to be running (however the X11 client libs must be installed)
You should install the client libs as well.
add a comment |
In fact wkhtmltopdf on linux requires quite a lot of Xorg as mentioned on the project page:
(Linux) No longer requires an XServer to be running (however the X11 client libs must be installed)
You should install the client libs as well.
add a comment |
In fact wkhtmltopdf on linux requires quite a lot of Xorg as mentioned on the project page:
(Linux) No longer requires an XServer to be running (however the X11 client libs must be installed)
You should install the client libs as well.
In fact wkhtmltopdf on linux requires quite a lot of Xorg as mentioned on the project page:
(Linux) No longer requires an XServer to be running (however the X11 client libs must be installed)
You should install the client libs as well.
answered Nov 15 '13 at 14:04
don.joeydon.joey
17.9k126695
17.9k126695
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f364590%2fwkhtmltopdf-displaying-text-as-blocks%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
I've just learned that PhantomJS also supports capturing to PDF, if that helps at all.
– ændrük
Nov 8 '13 at 21:42
@ændrük, Thanks for the suggestion. I've heard of it as well, but we've used wkhtmltopdf in other projects (.NET/Windows Server) and already have this implemented to how we like it.
– making3
Nov 8 '13 at 22:08