Bug 124377 - Make better bitmap export quality to PDF for Redaction
Summary: Make better bitmap export quality to PDF for Redaction
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0 target:6.3.3
Keywords: filter:pdf
: 127969 128089 158234 (view as bug list)
Depends on:
Blocks: PDF-Export Redaction
  Show dependency treegraph
 
Reported: 2019-03-27 21:28 UTC by Roman Kuznetsov
Modified: 2024-10-08 07:44 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of Redaction PDF (48.74 KB, application/pdf)
2019-03-27 21:30 UTC, Roman Kuznetsov
Details
Sample ODT with chart (22.50 KB, application/vnd.oasis.opendocument.text)
2019-09-09 03:43 UTC, Aron Budea
Details
Redacted PDF of sample (71.40 KB, application/pdf)
2019-09-09 03:46 UTC, Aron Budea
Details
Redacted PDF of sample, done on version 7.2.1.2 (80.96 KB, application/pdf)
2021-10-14 10:22 UTC, k.drozdek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2019-03-27 21:28:29 UTC
Description:
Make better bitmap export quality to PDF for Redaction
Now we don't have any options for quality of bitmap export to PDF when we use Redaction function

Steps to Reproduce:
1. Try use Redaction function
2. Look at result PDF (looks ugly)

Actual Results:
result PDF after Redaction function looks ugly

Expected Results:
result PDF after Redaction function looks fine


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Roman Kuznetsov 2019-03-27 21:30:06 UTC
Created attachment 150332 [details]
Example of Redaction PDF
Comment 2 Xisco Faulí 2019-05-06 17:08:08 UTC
@Muhammet kara, any opinion here ?
Comment 3 Muhammet Kara 2019-05-06 19:15:54 UTC
(In reply to Roman Kuznetsov from comment #0)
> Description:
> Make better bitmap export quality to PDF for Redaction
> Now we don't have any options for quality of bitmap export to PDF when we
> use Redaction function
> 
> Steps to Reproduce:
> 1. Try use Redaction function
> 2. Look at result PDF (looks ugly)
> 
> Actual Results:
> result PDF after Redaction function looks ugly
> 
> Expected Results:
> result PDF after Redaction function looks fine
> 
> 
> Reproducible: Always
> 
> 
> User Profile Reset: No
> 
> 
> 
> Additional Info:

Could you please share the source document so tha twe can reproduce?
Comment 4 Xisco Faulí 2019-05-09 09:47:40 UTC
Setting to NEEDINFO.
@Roman Kuznetsov, please provide the info from comment 3
Comment 5 Jean-Baptiste Faure 2019-05-25 16:43:48 UTC
If I understand the redact process correctly, there the pdf export is rather to print as pdf so that the text can't be selected in the resulting pdf.

Best regards. JBF
Comment 6 Aron Budea 2019-09-09 03:43:31 UTC
Created attachment 154033 [details]
Sample ODT with chart

While it's not the same doc, I added a pie chart to a simple document, and got a similar sample.
Comment 7 Aron Budea 2019-09-09 03:46:12 UTC
Created attachment 154034 [details]
Redacted PDF of sample

Here's the redacted PDF output (nothing is covered).
Comment 8 Commit Notification 2019-09-23 13:46:30 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/cd6780aae1392d4c1af0b15b311a4966834a9602

tdf#124377: enable anti-aliasing metafile during redaction

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2019-09-30 12:35:02 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/190f0621c2f799e5f44599ae93339aa93c9b9237

tdf#124377: enable anti-aliasing metafile during redaction

It will be available in 6.3.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Roman Kuznetsov 2019-10-06 17:37:27 UTC
*** Bug 127969 has been marked as a duplicate of this bug. ***
Comment 11 Roman Kuznetsov 2019-10-11 14:15:48 UTC
*** Bug 128089 has been marked as a duplicate of this bug. ***
Comment 12 Roman Kuznetsov 2019-10-11 14:16:29 UTC
Aron, is this bug fixed?
Comment 13 Aron Budea 2019-10-11 15:42:36 UTC
My change enabled anti-aliasing during redacted PDF export. Being the reporter, please check with a recent daily build, and judge for yourself (the description gives little help in evaluating the results).

Personally I'd say the font is still a bit blurry. The problem is that when exporting the metafile to bitmap, I found no option to set DPI in the code, but I didn't spend a lot of time digging around.
Comment 14 k.drozdek 2019-10-14 06:54:00 UTC
Thank you for directing me to this bug report, Roman.
I have tested the latest dev version, shapes are now nicely smoothed out around the edges, but I wouldn't consider the bug "fixed" without getting the resolution sorted, for printing this is still not close to being enough.
IMO, in case of PDFs that consist of images (scanned documents) the program should detect the resolution of the image and automatically use that resolution for the output file. For PDFs that only contain text, the user should be prompted for resolution, with the default option being (again, IMO) at least 200 DPI.
This feature should also know how to properly handle images with text (eg. scanned documents with invisible text applied over them for accessibility/WCAG purposes), but I think that's subject to another bug report :)
Comment 15 QA Administrators 2021-10-14 03:47:21 UTC Comment hidden (obsolete)
Comment 16 k.drozdek 2021-10-14 10:20:53 UTC
I have confirmed the issue on the latest version of LibreOffice.

Version: 7.2.1.2 (x64) / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: pl-PL (pl_PL); UI: pl-PL
Calc: threaded

I am attaching a PDF redacted using this version of the program for reference.
Comment 17 k.drozdek 2021-10-14 10:22:36 UTC
Created attachment 175733 [details]
Redacted PDF of sample, done on version 7.2.1.2
Comment 18 QA Administrators 2023-10-15 03:16:06 UTC Comment hidden (obsolete)
Comment 19 Roman Kuznetsov 2023-10-15 08:18:18 UTC
Let's close as FIXED by comment 9

in

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2a217a80bf383ddab0a5e0959ab2fd907dfd3406
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded

the PDF result looks much better than my example and I'm not sure could we do it better than now
Comment 20 Aron Budea 2023-11-26 10:08:27 UTC
Let's reopen, I'm sure this could be improved in some way, but I haven't looked into it myself.
Comment 21 Aron Budea 2023-11-26 10:08:57 UTC
*** Bug 158234 has been marked as a duplicate of this bug. ***
Comment 22 Peter 2024-10-08 07:44:02 UTC
There is another part of problem.
The redacted PDF quality is affected badly by low DPI. However, there isn't a way to set the DPI. I would expect to have it at least in Options, if not in Save dialog.