PNG/JPG Export of calc sheet with shapes = shapes shifted vertically

tdf#157293

Hello,
on any version of libreoffice, if i export a sheet (calc) in png or jpg, where some shapes are used, aligned with cells, these shapes will always be shifted vertically in the resulting image, not let aligned with the cells they refer to. (It can be seen in the image joined). All the losenges should be aligned with their corresponding text. bottom losenge should be located and aligned to the left of “earliest date…”
Thanks

bad-png-export-shape-alignment.ods (18.0 KB)

Can you please upload a sample file with your problem here. Thank you.


This is the guide - How to use the Ask site? - #3 by Hrbrgr

And please enter your OS and LibreOffice Version.

This is the guide - How to use the Ask site? - #3 by Hrbrgr
Thanks.

Sure, please find. Once exported, the losenge loses its given initial location.
Thanks


bad-png-export-shape-alignment.ods (18.0 KB)

You should anchor images to cells rather than to the page.

1 Like

Set the anchoring of the drawing object to “To cell”.


95928 HB bad-png-export-shape-alignment.ods (15,4 KB)
95928 HB bad-png-export-shape-alignment.pdf (48,9 KB)

1 Like

I tried with without success before posting… and it is still not working well. I am on linux from my side, could it explain the bug?
You exported in pdf, which works on my side as well. The issue is when exporting in png or jpg. Could you try on your side?

Exporting a direct PNG file doesn’t work for me either.

You can either create a PNG from the PDF or paste the text as a text box instead of writing it in a cell.
Then group the drawing object and the text box, then the PNG works.


95928 HB png-export-shape and Textbox.ods (15,8 KB)


With me:

Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: f5defcebd022c5bc36bbb79be232cb6926d8f674
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded

Ok thanks for your help and suggestions. i have a macro which exports the cells i select into a png. I wanted to keep it. I think it is a bug. Perhaps should i open an issue?
cheers

Gladly, maybe you can:

https://bugs.documentfoundation.org/

How to Report Bugs in LibreOffice - The Document Foundation Wiki


Please enter the bug number here as well. Thank you.

https://bugs.documentfoundation.org/show_bug.cgi?id=157293

1 Like

Seems bug was known and already traced.
https://bugs.documentfoundation.org/show_bug.cgi?id=152714