How To Hard-Wrap Text in LibreOffice Writer?

In order for me to upload a story I’ve written, the website requires the text to be “Hard-wrapped”, with no more than 55 characters per line. I can’t find a way to do that in LibreOffice. I don’t want to wrap text around an object, just limit myself to 55 characters per line in a paragraph. I know that pressing “Return” (Enter) at the 55 character point in a line is NOT the way to do it.

Maybe you can do it by an user defined macro.

Note: do it on a copy of the original document, because the desired structure makes your document unmanageable!

What you require is contradictory with the use of text processing application like Writer where line wrap is dynamically computed according to preceding text and formatting directives attached to it.

In fact, you want to capture the resulting end layout. There is a contorted way for that.

  • in Writer, set your formatting to achieve the 55-character limit (margins, font size, …)

    I hope your website doesn’t require also a monospaced font which is really ugly looking and for which a text editor is a sufficient tool.

  • export to PDF

  • open the PDF in a PDF viewer, copy text in text mode

  • paste text into Writer or a text editor

    In Writer, you get one paragraph per line. In a text editor, the lines are delimited by a standard end-of-line character (without any formatting of course).

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

As already said, it is quite hard in LibreOffice, thus, not really feasible. I would do it as follows:

  1. Save the file as unformatted text. Use UTF-8 to be on the safe side.
  2. Open the file in a good text editor (not a word processor), set the wrap margin and apply hard wrap (the exact name may be different in a particular program). My recommendation is jEdit, read this page.
  3. Reopen, if necessary, in LibreOffice and resave to the desired format.

Note that the above procedure will remove any text formatting.