I just lost my LibreOffice virginity, but I'm stuck already :(

Hi, just using LibreOffice for the first time (seems very nice), and I have 2 questions:

  1. When pasting large images into the document, how can I have them automatically scale to fit inside the margins, and then compress them all at once to jpg?

  2. I’ve finished my document, and now want to copy from libre office, and paste into the text editor on the website I’m writing for. When pasting the entire document, the images are blank, and the html view of the online editor shows they’re still linked to my local file system. If I copy and paste the images individually from libre office, they paste in just fine. Is there a way to ‘copy flattened’ so that that when I copy the entire document, the clipboard has text and pixel data rather than text and links?

On windows, with the latest version of LibreOffice.

Cheers
Michael

Does not mean anything: you didn’t mention OS name and release varies with OS version; we don’t know when you last updated, LO releases receive bug fixes rather frequently.

Writer is not an image processing program. It provides very limited capabilities and, anyway, will never convert images to other formats.

Your best solution is to pre-process your images in a dedicated graphics application and change it to the final “aspect” (crop, size, scale, definition, colour correction, format, …). prepare the image so that Writer will only have to use as is. This will make your document to the minimal size and improve Writer performance by avoiding “expensive” operations not related to text management.

You didn’t mention the saving format of your document (.odt or .html). Copying from Writer into a text editor will lose all formatting directives. Consequently, there is no point in preparing your pages in Writer to paste only plain text in the editor. Do your job directly writing HTML in the editor.

If you’re using the HTML feature of LO, save as .html and open this HTML file in your editor. Formatting directives are interspersed in the document as CSS (but it is frequently “ugly” and does not always translates exactly Writer formatting.

Remember that a filesystem and links in HTML pages are based on different concepts. A URL like file:///root/directory/file cannot be correctly interpreted in page http://host/path/to/page.html.
Even if pictures are individually correctly pasted into the editor, it does not mean they’ll be retrieved when you switch to a browser. Check the references.

  1. Thanks. I’m on windows 11 using the latest stable release of libre office 24.8.3.2

  2. I notice that libre does already have a compress option (right click an image), and also the ability to scale the image either by hand or using the margin on the ruler at the top (once manually resized). So perhaps it’s not a stretch that it’s already possible to have it automatically utilise those existing tools for you. At the moment I’m pasting, then dragging the resize handle until it’s not outside the bounds of the document, then right clicking and choosing compress.

3). I’ve saved as odt, and i’ve also tried exporting as html. When I copy from writer, the css is preserved when I paste into the website’s editor. Just the images are missing.

4). I’ve checked the html of the website, and when pasting the images individually they are indeed showing the url of the website in the image tag (so are hosted there). I understand the difference between a local file system and an online server hosting images :slight_smile: I’m just asking if there’s a way to copy the pixel data of more than one image at once into the clipboard along with the text. Perhaps there are custom windows clipboard applications that can achieve this?

Cheers :+1:

Please click on a comment bubble to reply with a comment; the Suggest a Solution is reserved for answers.

This will convert the image to png so as to not lose any information, for a jpg this is likely to massively increase file size. Always click Insert > Image to insert the image in its original format. The inserted image will be inside the page margins.

Typically, I optimise the image for its final destination in a dedicated graphics editor and save that image in a subfolder of the document. I might save as [original filename]_sm.xxx so if needed I can have original file and the modified version in the same folder.

Thanks. I actually pasted the entire document from office 365 rather than pasting the images one at a time. The images were each the original file size, and the compress to jpg option reduce them by around 50% file size.

Thanks for the tip on the insert command though. I’ll be sure to try that if ever I paste images individually.

Is there a way to select multiple images in the document, and then just click something like ‘scale to margins’ ? And then maybe a way to select multiple images, right click and say ‘compress all’ which would then give me the usual compression dialogue to choose the settings that should be applied to the selected image? I can’t even find a way to select multiple images at once (without text in between getting selected). I’m undoubtedly being a moron.

It would be better to open the docx in Writer and paste directly into the new document; size and format will be preserved.
.
You cannot select multiple images in Writer but you can in Draw. Nevertheless, a dedicated graphics editor should allow batch resizing of a folder of images.

1 Like

Thanks. That was actually the reason I decided to try Libra, I was having issues downloading my docx from 365.

All sorted now anyway, thanks for confirming I cant fit images to the document’s margins. That’ll save me time bashing my head.

I don’t have Office 365 so cannot replicate. Maybe you are pasting a table with the image inside?

Generally if you paste images they do fit within the margins automatically; I am not sure you can force them beyond the page

No, no tables and I didn’t apply any formatting to the images. I had the same issue pasting from both 365 and google docs. Interesting to know that this is not correct behaviour though. I thought it was a bit odd that I’d need to manually resize every image by hand. Hopefully a future update will resolve the issue, for now though, I’m not going to worry about it. Decided to just use the websites editor to compose future documents. I just thought it would be nice to have a local master copy, but I’m going to lean towards the less problematic solution :smiley:

Solution for question 2 was to just copy and paste the entire document including images from libra into the webpage’s editor, then manually remove and replace the empty images by copying the images one by one from libra.

Alternatively, I was also able to export as xhtml from libra, open it in notepad, then copy and paste it into the website’s text editor. After removing the bumf and body tags, images and text appear, with correct formatting. However this was not a good solution in the end, because the image pixel data was represented by text string, so the website was taking FOREVER to open.

Quesion 1 answer was, it’s not possible to select multipe images, nor is it possible to have the images automatically fit within the margins. They have to be manually resized by hand one by one (ouch).

The program you are using is named LibreOffice. Libra is an Australian manufacturer of products to meet the intimate hygiene needs of women.

oh crap, that’s why it wasn’t pasting right then! Sorry guys, I’m in the wrong place :slight_smile:

You are in the right place, just using wrong name for the software.

1 Like