You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Description:**
I am currently using docxTemplater to replace tags and generate a Thai language DOCX document. However, the generated text is not recognized as Thai; instead, it treats the entire string as a single character. As a result, the document does not break lines according to Thai word boundaries.
For example, the Thai sentence:
"เป็นสินค้าที่ทำรายได้ให้แก่ประเทศไทยมากที่สุดอย่างหนึ่ง" consists of 10 Thai words, but docxTemplater generates it as one unbreakable word.
Is there a way to resolve this issue?
Here is my code for reference:
constrenderDoc=(renderDocData)=>{loadFile("/doc/template.docx",(error,content)=>{if(error){console.error("An error occurred",error);throwerror;}constzip=newPizZip(content);constdoc=newDocxtemplater(zip,{paragraphLoop: true,linebreaks: true});// Fill datadoc.render(renderDocData);constout=doc.getZip().generate({type: "blob",mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"});// Output document via Data-URIsaveAs(out,formData.value.paperName+'.docx');});};
Thank you for your assistance!
The text was updated successfully, but these errors were encountered:
**Description:**
I am currently using docxTemplater to replace tags and generate a Thai language DOCX document. However, the generated text is not recognized as Thai; instead, it treats the entire string as a single character. As a result, the document does not break lines according to Thai word boundaries.
For example, the Thai sentence:
"เป็นสินค้าที่ทำรายได้ให้แก่ประเทศไทยมากที่สุดอย่างหนึ่ง" consists of 10 Thai words, but docxTemplater generates it as one unbreakable word.
Is there a way to resolve this issue?
Here is my code for reference:
Thank you for your assistance!
The text was updated successfully, but these errors were encountered: