我有一个在 html 中用 RTL 编写的页面,它可以,但是在使用wkhtmltopdf转换后它是居中的。
我如何告诉 wkhtmltopdf 将该页面向右对齐?
对于页眉和页脚,有一个选项,但是如何为正文做呢?
我有一个在 html 中用 RTL 编写的页面,它可以,但是在使用wkhtmltopdf转换后它是居中的。
我如何告诉 wkhtmltopdf 将该页面向右对齐?
对于页眉和页脚,有一个选项,但是如何为正文做呢?
Could you post your sources somewhere so it would be a bit easier to test?
Have you tried using CSS for the text aligns? Try doing a few tests with simple html files that have paragarphs with the following CSS rules for example:
.rtl {
direction: rtl;
text-align: right;
unicode-bidi: bidi-override;
}
.ltr {
direction: ltr;
text-align: left;
unicode-bidi: bidi-override;
}
The CSS rules are taken from an answer by @ThinkingStiff what I would imagine would be the solution or at least very similar: https://stackoverflow.com/a/11787780/694325