I am trying to create a docunent with RTL (Right-To-Left) text direction
def printExam():
#get the exam questions
rows = db(db.exam_questions.exam == req
No custom style has been defined on your paragraph so a default latent style is applied and this kind of style is read-only because it has no real definition in the document.
Apply a custom style on your run or your paragraph and you will be able to customize it. For a run, you have to create character style (WD_STYLE_TYPE.CHARACTER
).
# create the document and the custom style
document = Document()
mystyle = document.styles.add_style('mystyle', WD_STYLE_TYPE.CHARACTER)
...
...
# apply the custom on the run
run.style = mystyle
font = run.font
font.rtl = True