How to remove the extra space and new line in a LibreOffice document?
https://www.zyxware.com/sites/default/files/styles/user_image/public/default_images/index.png?itok=2YmREnrP
BY anju.r
6 years ago
Software-Testing
1 comments comment

Suppose you are documenting in LibreOffice Writer and in the middle of it you found that there exists a lot of extra space before every new line. It is a tedious job if you try to remove the extra space manually. Sometimes we encounter the same issue while copy pasting some documents from the web. Here I am going to explain a simple one step procedure to remove the extra space and new line in a LibreOffice document.

For a better understanding check the sample document below which contains a lot of spaces.
image

Our first intention is to remove the extra space before the new lines. For this you have to open the 'Find and replace' Dialog box. You can open this Dialog either from Edit --> Find and replace or by pressing Ctrl + H.
Then select the checkbox 'Regular expressions' by clicking the 'More Options' in the Dialog box. In the Dialog box enter ' +' (space+) in the 'Search for field' and leave the 'Replace with' field as empty.' +' can be used to remove one empty character.

'+' finds one or more of the characters in front of the "+". If you want to remove more than one character, you have to enter ' +'(spacespace+). Then click the 'Replace All' button. This will remove all the empty spaces in your document. Please check the image below for reference.

sitemap

Now for the new lines in the document.
To do this open 'Find and replace' Dialog again and Enter '^$' in the 'Search for field' and leave the 'Replace with' field as empty. '^$' can be used to remove the empty paragraph. Then click the 'Replace All' button. This will remove all the new lines in your document. Please check the image below for reference.

sitemap

Please note that I tested this property in Ubuntu 12.04 and LibreOffice 3.5.4.2.
I hope this method helps you to remove the entire space / new lines in the document.


RELATED ARTICLE

/themes/custom/zyxpro_light/images/placeholder.png
close

on 30th May 2012 / by anju.r
A software bug is defined as an error or failure or fault in a system or computer program that produces an unexpected or incorrect result. This is applicable for any Drupal/non-Drupal website. The bug life cycle in a Drupal website consists of steps from identification to closure of a bug. Different stages of Bug Life Cycle are: Drupal Software Testing Leave a reply Your email address will not be published. Required fields are marked *
Leave a reply
Your email address will not be published. Required fields are marked *

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
The content of this field is kept private and will not be shown publicly.
CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

author-image
Anonymous (not verified)
access_time 23 Oct 2019 - 12:06

Thanks you!!, This is great help.