1

I have a page that is written in RTL in html it is ok but after the conversion with wkhtmltopdf it is centered.

How can I tell wkhtmltopdf to align that page to the right?

For headers and footers there is an option for that, but how to do it for the body?

Christofer Eliasson
  • 32,939
  • 7
  • 74
  • 103
user776253
  • 11
  • 2

1 Answers1

1

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

Community
  • 1
  • 1
Joel Peltonen
  • 13,025
  • 6
  • 64
  • 100