Bug 150875 - Hatch pattern scaling depends on DPI (screen scaling) on PDF export
Summary: Hatch pattern scaling depends on DPI (screen scaling) on PDF export
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.4.1.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Export Object-Fill-Pattern
  Show dependency treegraph
 
Reported: 2022-09-09 06:30 UTC by Mike Kaganski
Modified: 2023-07-18 17:24 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Export with screen scaling 100% vs 150% (85.21 KB, image/png)
2022-09-09 06:30 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2022-09-09 06:30:50 UTC
Created attachment 182330 [details]
Export with screen scaling 100% vs 150%

Using the unit test document for tdf#147027, run this command line:

> soffice --convert-to pdf vcl/qa/cppunit/pdfexport/data/tdf147027.ods

Depending on current desktop scaling, the hatch pattern used in the chart would have different scale in the output PDF.

The attached screenshot shows the difference with two screen scaling values using

Version: 7.4.1.1 (x64) / LibreOffice Community
Build ID: 0a046a10cbf1679eea5538bd3ab63156caa3a036
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

The same result would be with documents created from scratch:
1. In a new Writer document, insert a shape;
2. In its area properties, select a hatch pattern;
3. Use toolbar button to export to PDF.

Before a workaround implemented in commit 3801a45eb8e82095d5f1a65ad1646e300a900bdd, the respective unit test failed on screen scaling other than 100% with:

> C:/lo/src/core/vcl/qa/cppunit/pdfexport/pdfexport.cxx(2253) : error : Assertion
> Test name: `anonymous namespace'::testTdf147027::TestBody
> equality assertion failed
> - Expected: 778
> - Actual  : 1754
Comment 1 Stéphane Guillou (stragu) 2023-07-18 17:24:06 UTC
No repro in 7.4.7.2 nor in 7.5.4.2 on Ubuntu 20.04 with GNOME 3.36.8.

As with other issues in which OS scaling interferes with images and fills, might be Windows-only, I can check later.