Bug 139772 - FILEOPEN PDF: Importing results in poor quality (unreadable bitmap text)
Summary: FILEOPEN PDF: Importing results in poor quality (unreadable bitmap text)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pdf
Depends on:
Blocks: PDF-Import-Draw
  Show dependency treegraph
 
Reported: 2021-01-19 21:18 UTC by Luke
Modified: 2024-03-20 12:47 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Testfile which imports in horrible quality (3.25 MB, application/pdf)
2021-01-19 21:20 UTC, Luke
Details
Comparison screenshot 1 (366.74 KB, image/png)
2021-03-08 18:50 UTC, Luke
Details
Comparison screenshot 2 (274.19 KB, image/png)
2021-03-08 18:50 UTC, Luke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2021-01-19 21:18:00 UTC
Description:
Importing some pdf files drastically reduces (the imported) file quality. In some cases content is barely readable anymore.

In pdf reader applications (i.e. adobe reader) everything is fine, just after import it looks horrible in draw.

I will append a testfile that shows the problem

Steps to Reproduce:
1. Watch the pdf file first in a pdf reader. Even with some zoom everything looks ok and is clearly readable
2. import the pdf file (via explorer->rigth click->open as->libre office OR open draw and do file->open->select pdf file) 


Actual Results:
Imported (text-)images are heavily stripped down in quality and are barely readable

Expected Results:
Import in full pdf quality (or at least close to it)


Reproducible: Always


User Profile Reset: No



Additional Info:
This happens only on some files. Most files work fine.
Comment 1 Luke 2021-01-19 21:20:19 UTC
Created attachment 169027 [details]
Testfile which imports in horrible quality
Comment 2 Timur 2021-03-05 12:35:46 UTC
repro 7.2+.
but you need to be precise what exactly is wrong. 
best put sceens aside with good and lo rendering and make screenshot. 
Should be also searched for duplicates.
Comment 3 Luke 2021-03-08 18:48:43 UTC
Hi,

I've appended two comparison screenshots. Used LO 7.1.0.2 for them.

"What exactly is wrong?" 
-> The whole image quality in Draw is very low, looks like it got heavily scaled down during import.
Comment 4 Luke 2021-03-08 18:50:00 UTC
Created attachment 170344 [details]
Comparison screenshot 1
Comment 5 Luke 2021-03-08 18:50:23 UTC
Created attachment 170345 [details]
Comparison screenshot 2
Comment 6 V Stuart Foote 2022-11-20 22:39:38 UTC
Hmm, I set the new project provided os/DE environment variable 

PDFIMPORT_RESOLUTION_DPI = 300 (or higher)

But seems like the pdfimport filter still uses the default 96dpi for PDFs like this composed of raster image pages, and the pixilation noted occurs.

But if I "insert as image" with the pdfium filter, the first page of the PDF gets rendered to canvas with good quality at the page scale.

@Tomaž, @Ashod shouldn't the environment variable also be affecting the pdfimport filters? Or am I missing something...

=-ref-=

https://gerrit.libreoffice.org/c/core/+/113223
https://gerrit.libreoffice.org/c/core/+/121087
Comment 7 Tomaz Vajngerl 2023-01-18 04:10:10 UTC
PDFIMPORT_RESOLUTION_DPI was added only for PDFIUM import
Comment 8 Stéphane Guillou (stragu) 2024-03-20 12:47:00 UTC
Same in LO 3.3.0
Still current in recent trunk build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 53c5d570cab036b23f4969b858a648c8f0c24f93
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded