Dimensions when Pasting svg file into writer table

Hi
I’m copying svg files from a file browser win 10 and pasting as character into a table in lo writer 7.6.2.1. They always seem to paste with height about 12 point, increasing the font size in the cell doesnt make any difference. I dont know how the size of the pasted image is determined. .svg file should resize ok, so Is there a way to make the pasted file fit the row height?
When opened in irfanview the svg file displays with dimensions 1024x429 pixels.
I know i can resize manually after pasting but i have in excess of 500 svg files to go into a table or rather into a series of tables, and to resize each individually to the same height would be rather tedious to say the least so something automatic would be preferred.
Thanks
/Gary

Please attach a sample file with a single svg drawing. While at it, mention OS name, LO version and save format?

Here is a sample file. Os & lo version as above. Not sure what you mean by save format tho.

(Attachment G1-X1%F9-N5%Z1 20.svg is missing)

Sorry apparently .svg is not an authorised extension for an attachment. Not sure why im getting that rejection, im sure ive sent svg docs before…

You can cheat the AskLO Discourse engine by adding extension .odt or .pdf after .svg in the filename. But I’d like also to have a sample document with a table to see how you globally format.

Ok try this

New Document.odt (9.23 KB)

(Attachment G1-X1%F9-N5%Z1 20.svg.svg is missing)

I changed it to .svg.odt but it got changed to .svg.svg during the attachment or send process. Removing .svg altogether to see if that will work

New Document.odt (9.23 KB)

(Attachment G1-X1%F9-N5%Z1 20.svg is missing)

No it doesnt. Seems like the attachment process actually çheçks tĥe fiĺe type not just tĥe extension. Ì càn pasþe the svg ìnto a ðocument and send that… here it is, may or may not be adequate but its all i could think of to do.

New Document 2.odt (33.6 KB)

I think this is your OS. I have no problem under Linux. If you’re under Window$ and extensions are hidden in the file browser (selectable option), it is possible that W$ systematically adds its extension after the visible part of the file name. In other words, if you see only New Document (with implied .svg) and you force New Document.odt, W$ will “fix” the name to New Document.odt.svg.


I looked at your “combined” document with the embedded SVG. I think the issue comes from the drawing itself. It is declared as width='44.32776641845703' height='18.0'. Note no explicit unit is given. The default unit is pixel in SVG. With 1px=1/72" (if this is the conventional definition), height should be 1/4" or 6.25mm, but Properties report 4.8cm (I found afterwards its grid is 96ppi instead of 72ppi). I tried to change the unit in the declaration, which effectively changed the bounding rectangle used by Writer but since I didn’t patch all point coordinates, the drawing is not bigger.

You should edit your drawing in some SVG editor to modify its scaling.

After that a hack:

  1. make a copy of your document
  2. change extension of the copy from .odt to .zip
  3. use an archive/zip editor of the “copy”
  4. open the Pictures directory
  5. note the name of the SVG image
  6. rename your patched image to this exact name
  7. replace the embedded image by your edited one
  8. save the modified archive
  9. revert to standard .odt extension

Now your document should display your images with the new size.

My suggestion may be wrong: I thought you used 500+ times the same image. In which case my hack can resolve the issue. If you have 500 different images, there is no hope. Fix is manual as @bantoniof describes it.

  • The information of the SVG file that Inkscape provides is 44x18 px and 96ppp
  • The size of the images is not changed by changing the size of the paragraph or character to which they are anchored

To change the size of the image:

  1. Select the image
  2. Click the right button over the image and choose Properties in the context menu (you can also, use a double clic)
  3. In the Image Properties dialog click on the CROP tab
  4. In the Scale (horizontal and vertical fields) tipe the same percentage

Thanks for the info, i’ll look into that. Im actually posting from my phone as i dont have internet for my laptop. I renamed the file in android before sending.
It may be then that i have to work out how to set the size i want in the program that generated the image.

For the first image:

  1. Select the image (click)
  2. Open the Properties dialog (F4)
  3. Choose the Position and Size tab (usually the default tab)
  4. Mark [x] Keep ratio (Alt+K, in the English UI)
  5. Set the Height (Alt+E, number keys)
  6. Enter

For the 499+ following images:

  1. Select the image (Tab)
  2. Open the Properties dialog (F4)
  3. Set the Height (Alt+E, number keys)
  4. Enter

Could make a makro with the sequence.