Bug 147891 - Regression: roundtrip of presentations/drawings including cropped PDF images is broken
Summary: Regression: roundtrip of presentations/drawings including cropped PDF images ...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.3.1.3 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-10 08:32 UTC by Callegar
Modified: 2023-01-11 14:20 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample image to insert, crop and scale (85.22 KB, application/pdf)
2022-03-10 08:33 UTC, Callegar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Callegar 2022-03-10 08:32:05 UTC
Description:
This is a regression that was probably introduced at the time of the pdfium transition. Rather sure that the issue was not there before.

If you insert a PDF image in a presentation or a drawing, you crop it, you scale the result, you save and you reload, then what you reload is often quite different from what you saved.

Because of this issue it is unsafe to use PDF images in presentations as you will never be sure if the result can be preserved.

I think that I have a reproducible case which I hope shall help debugging. Please follow the steps below.

A final note: I hope that this could be the occasion to deal also with the other regressions that were accidentally created with the pdfium transition, that is already a bit far away, most notably the mismanagement of PDF images with no background.

Steps to Reproduce:
1. Open drawing or presentation, set size to landscape A4
2. Insert sample PDF page
3. Use "crop dialog" to crop at 119 mm top and 28 mm bottom
4. Use position and size dialog to set width to 220 mm proportionally scaling the height, also set position of top left corner at x=30mm, y=33mm so that the resulting cropped image is nicely centered
5. observe the result
6. save
7. reload
8. observe the result again
 

Actual Results:
Reloaded page/slide is quite different from the saved one.

Expected Results:
Reloaded page should be identical to saved one.


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: PresentationDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes
Comment 1 Callegar 2022-03-10 08:33:19 UTC
Created attachment 178769 [details]
Sample image to insert, crop and scale
Comment 2 raal 2022-05-26 17:32:42 UTC Comment hidden (obsolete)
Comment 3 raal 2022-05-26 17:35:15 UTC
(In reply to raal from comment #2)
> Hello, 
> I doesn't see crop dialog in Draw:
> 3. Use "crop dialog" to crop at 119 mm top and 28 mm bottom
> According the help page
> https://help.libreoffice.org/latest/he/text/shared/02/24100000.html this
> dialog is not available in Draw.
> 
> Tested with Version: 7.2.0.0.alpha1+ / LibreOffice Community
> Build ID: ff2ba77f22b2e96f96f5537aec1705956b47583d
> CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
> Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
> Calc: threaded
> and tried reproduce your steps. I cannot confirm the bug.

Also tested Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: b6e0ae1b1bad5e222e21bbb4b2a158c1fc6f9779
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded Jumbo
Comment 4 Callegar 2022-05-26 21:25:25 UTC
@raal

The dialog is there... not very easy to find, though.
If you do not have it in the menu, you can easily add it via the Tools -> Customize functionality, searching for "Crop Image Dialog"

In any case the availability of the dialog is not essential to check for the bug. It only makes it easier to have a fully reproducible procedure.  The bug is there also in case of manual cropping using the cropping handles instead of a dialog to enter numeric values for the crop margins.
Comment 5 raal 2022-05-27 05:04:41 UTC
Yes, I used manual cropping. Can you attach printscreen before and after save?
Comment 6 Buovjaga 2023-01-11 14:01:12 UTC
Not reproduced.

(In reply to raal from comment #5)
> Yes, I used manual cropping. Can you attach printscreen before and after
> save?

If you still see this in 7.4, would be nice to see the bad result.
Also, you can try bisecting: https://wiki.documentfoundation.org/QA/Bibisect/Linux

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 158f77b7015fce8a327297736dc11b6a78b9b4d2
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 11 January 2023
Comment 7 Callegar 2023-01-11 14:16:39 UTC
Seems OK now! Please set to resolved as needed.
Comment 8 Buovjaga 2023-01-11 14:20:03 UTC
Grrrreat!