Bouke / docx-mailmerge

Mail merge for Office Open XML (docx) files without the need for Microsoft Office Word.
MIT License
273 stars 104 forks source link

Overstretched last line when using justified alignment #86

Open jukesalot opened 4 years ago

jukesalot commented 4 years ago

Expected Behavior

When merging a document using justified alignment, I would expect that '\r\n' would act as a paragraph end in word. This would prevent the last line from being over stretched over the width of the document.

Current Behavior

Example from a random paragraph generator merges like the following:

She nervously peered over the edge. She understood in her mind that the view was supposed to be beautiful, but all she felt was fear. There had always been something about heights that disturbed her, and now she could feel the full force of this unease. She reluctantly crept a little closer with the encouragement of her friends as the fear continued to build. She couldn't help but feel that something horrible was about to happen.

Possible Solution

n\a

Steps to Reproduce (for bugs)

  1. Create template with justified alignment
  2. Merge document with a lengthy paragraph

Context

Attempting to merge a legal document.

Your Environment