jsdocuments

  • Pricing
  • Features
  • Documentation
    Documentation
    • Introduction
    • JavaScript API
    Information
    • News
    • FAQs
  • Support
    • Support
    • Updates
    • Forum
  • Try
  • Contact
  • Log in
  1. Home
  2. Documentation
  3. JavaScript API
  • addBookmark
  • addBreak
  • addComment
  • addCrossReference
  • addDateTime
  • addEndnote
  • addExternalFile
  • addFootnote
  • addFormElement
  • addImage
  • addLink
  • addList
  • addMathEquation
  • addMergeField
  • addPageNumber
  • addSimpleField
  • addStructuredDocumentTag
  • addSvg
  • addTab
  • addTable
  • addTableOfContents
  • addTableOfFigures
  • addText
  • addTextBox
  • addWordFragment
  • addWordMl
  • addBackgroundImage
  • addFooter
  • addHeader
  • addSection
  • modifySectionLayout
  • setBackgroundColor
  • setRtl
  • addProperties
  • docxSettings
  • createCharacterStyle
  • createListStyle
  • createParagraphStyle
  • createTableStyle
  • getTemplateSymbols
  • getTemplateVariables
  • openTemplate
  • processTemplate
  • removeVariableImage
  • removeVariableText
  • replaceVariableCheckbox
  • replaceVariableExternalFile
  • replaceVariableImage
  • replaceVariableInputField
  • replaceVariableList
  • replaceVariableTable
  • replaceVariableText
  • replaceVariableWordFragment
  • replaceVariableWordMl
  • setTemplateSymbols
  • convertMeasuringUnit
  • save

setRtl

Sets RTL.

Description

setRtl (rtl: boolean = true, bidi: boolean = true): this

Code samples

Example #1

import { CreateDocx } from "build";
import * as fs from "fs";

const docx = new CreateDocx();
docx.setRtl();

docx.addText("טקסט פשוט בעברית.");

docx.save().then(contents => {
    fs.writeFileSync("setRtl_1.docx", Buffer.from(contents));
});

The resulting Word document looks like:

Download example document

Release notes

  • jsdocuments 1.0:
    • New method
logo

jsdocuments is a product developed by NarceaLabs, a web app development company founded in 1999.

About Us

Need Help?

  • Support
  • Documentation
  • How it works
  • License Conditions

Explore

  • Pricing
  • Features
  • News
  • Try

Contact info

NarceaLabs
C. del Príncipe de Vergara, 112
MADRID 28002, SPAIN

Contact form


2025 © NarceaLabs. All rights reserved.