[Solved] Insert images with 100% to free space

Discuss the word processor
Post Reply
john1320
Posts: 70
Joined: Mon Jun 12, 2017 8:22 pm

[Solved] Insert images with 100% to free space

Post by john1320 »

In my page layout, I have right indent equal to 4 centimeters, as shown here:
para.png
para.png (8.74 KiB) Viewed 1215 times
The problem is, that sometimes I need to insert large images (namely, screenshots), and I want to give them as much space as possible. But, LibreOffice automatically reducing their size. It's more easy to show in the following pictures. Here is how it pasted currently:
current.png
And below is desired result (see next). I can acheive it manually, but it is not convenient:
desired.png
I already tried 2 options to fix it, but both don't work for me.
Option 1. I tried to enable "Keep ratio" check box in the "Graphic" frame style. But, for some reason, this check box is grayed out and cannot be enabled.
Option 2. I tried to "hack" document, by opening it with 7zip and add some code in styles.xml, the same way as fixing the default images anchoring[*]. Doesn't work. The image is slightly distorted, and also, when I try to open "Graphics" style, LO crashes. I still hope to force this method to work.
[*] To change default anchoring for images, open styles.xml and change:
<style:graphic-properties text:anchor-type="paragraph"
to
<style:graphic-properties text:anchor-type="as-char"

This is just an addition to my post, and there is no problem with this replacement. It works fine.
Is there a way to achieve the desired result automatically?
Last edited by john1320 on Sun Jul 16, 2017 11:16 pm, edited 1 time in total.
LibreOffice 5.2.7 on Windows 7
erbsenzahl
Volunteer
Posts: 255
Joined: Tue Apr 18, 2017 8:23 am
Location: Germany

Re: Insert images with 100% to free space

Post by erbsenzahl »

john1320 wrote:Is there a way to achieve the desired result automatically?
Automatically?
My suggestion is to insert a frame (Tools menu) as container for your screenshot. Use Auto text. You only have to type a key combination.

Frame properties:
Width: as you like it, maximum, 17 cm; height: Auto size; wrap: parallel; anchor: to paragraph, possibly as or to character (try out); no borders
When inserting a bitmap anchor as character.

If no other solution it would do and keep ratio of bitmap.
LibreOffice current versions 7 and OpenOffice 4.1.15
on LinuxMint 20 - 21 Mate, W10-64 pro
john1320
Posts: 70
Joined: Mon Jun 12, 2017 8:22 pm

Re: Insert images with 100% to free space

Post by john1320 »

Thanks, erbsenzahl. To be honest, there is simpler way: just create some paragraph style without right indent ("Image Paragraph"). Then, as first step, apply this style to new line, and then insert image. This approarch, as well as yours, could be named "semi-automatical".
LibreOffice 5.2.7 on Windows 7
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Insert images with 100% to free space

Post by John_Ha »

It takes three keystrokes:

1. Select the image
2. Press SHIFT and drag a handle. The aspect ratio is preserved.

If this solves the problem, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
john1320
Posts: 70
Joined: Mon Jun 12, 2017 8:22 pm

Re: Insert images with 100% to free space

Post by john1320 »

Thanks, John. I marked thread as solved.
LibreOffice 5.2.7 on Windows 7
Post Reply