Jonas Newejs
Jonas Newejs

Reputation: 102

How do you keep the styling when you convert docx to pdf in Pandoc?

I m using pandoc to convert docx file to pdf. Command I'm using for converting:

pandoc -o document.pdf document.docx

The problem is that after the convert, the styling disappears.

enter image description here

As you can see, The colors are missing and my table's position is moved to right

Upvotes: 5

Views: 2813

Answers (1)

mb21
mb21

Reputation: 39498

Pandoc does not convert styles/layout/formatting.

From https://pandoc.org/MANUAL.html:

Because pandoc’s intermediate representation of a document is less expressive than many of the formats it converts between, one should not expect perfect conversions between every format and every other. Pandoc attempts to preserve the structural elements of a document, but not formatting details such as margin size.

Upvotes: 1

Related Questions