Bug 108813 - FILEOPEN pdf import creates unwanted rectangles
Summary: FILEOPEN pdf import creates unwanted rectangles
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0
Keywords: filter:pdf
Depends on:
Blocks: PDF-Import-Draw
  Show dependency treegraph
 
Reported: 2017-06-27 12:25 UTC by georg.weickelt
Modified: 2024-09-04 09:40 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of unwanted result (134.09 KB, image/png)
2017-06-27 12:25 UTC, georg.weickelt
Details
pdf-source (83.91 KB, application/pdf)
2017-06-27 12:26 UTC, georg.weickelt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description georg.weickelt 2017-06-27 12:25:39 UTC
Created attachment 134310 [details]
screenshot of unwanted result

importing a pdf with small areas into draw (d&d) results in big rectangles
Comment 1 georg.weickelt 2017-06-27 12:26:34 UTC
Created attachment 134311 [details]
pdf-source
Comment 2 Xisco Faulí 2017-06-27 14:16:32 UTC
Reproduced in

Version: 6.0.0.0.alpha0+
Build ID: 08f6f9dded1b142b858c455da03319abac691655
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

and

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 3 V Stuart Foote 2017-06-27 14:58:13 UTC
Confirmed, but this affects just the pdfimport import filter (checked Draw, Writer, Impress) but not the new pdfium based ipdf insert filter. If sample is inserted as image it is formatted correctly.
Comment 4 georg.weickelt 2017-12-15 13:21:17 UTC
Sorry, the difference is:
pdfimport => vector
pdfmium => pixel
Comment 5 V Stuart Foote 2017-12-15 15:59:59 UTC
(In reply to georg.weickelt from comment #4)
> Sorry, the difference is:
> pdfimport => vector
> pdfmium => pixel

And? Two simple facts... LibreOffice is _not_ a PDF editor, and PDF is _not_ intended to be an editable format. 


For this PDF, the pdfium based insert handles the area fills correctly, the pdfio filter import does not.

Inadequacies of the PDF Import filter--pdfio (which breaks apart a PDF into component Draw objects) are well known as are the issue here with clipping these area fills (this should probably be closed as a duplicate of bug 86211).

Our move to pdfium for insertion of PDF as an image, with loss of "break" (with its call the pdfio filter), gives very high quality raster rendering of PDF into ODF documents. What the vast majority of users require and the direction we've taken our handling of PDF.

Further work on the pdfio import filter is needed and will occur--though personally I think export handling are the higher priority.

Meanwhile, Miklos continues to work with Google's pdfiumm based filter. We hope the eventual introduction of a skia based integration to canvas will restore vector based PDF rendering, but it is not there yet (bug 106581).
Comment 6 Callegar 2017-12-15 16:08:52 UTC
Is the management of transparent background with pdfmium fixed in the forthcoming LibO 6?

Otherwise, for many applications the pixel perfect pdfmium remains not an option.
Comment 7 QA Administrators 2018-12-16 03:50:55 UTC Comment hidden (obsolete)
Comment 8 georg.weickelt 2018-12-20 08:49:54 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2020-12-20 03:45:32 UTC Comment hidden (obsolete)
Comment 10 Timur 2021-04-22 10:05:24 UTC
Repro 7.2+
Comment 11 QA Administrators 2023-04-23 03:26:12 UTC Comment hidden (obsolete)
Comment 12 georg.weickelt 2023-04-24 05:57:55 UTC
Bug ist still present in Version: 7.4.6.2 (x64) / LibreOffice Community
Build ID: 5b1f5509c2decdade7fda905e3e1429a67acd63d
CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded

Importing as an image leads to poorer image quality - therefore a functioning PDF import with vectors as the result would be desirable. Changes to the content are not most important - rather additions.
Comment 13 Commit Notification 2024-08-29 12:30:19 UTC
Dr. David Alan Gilbert committed a patch related to this issue.
It has been pushed to "master":

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

tdf#101611, tdf#108813, tdf#86211, sdext,pdfimport: Clip fills

It will be available in 25.2.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 14 Dave Gilbert 2024-08-29 12:58:46 UTC
You should find that fixed by my commit that's just landed on master.
Please reopen if you still have problems!
Comment 15 georg.weickelt 2024-09-02 09:34:31 UTC
I can confirm that the problem no longer occurs in the current development version. Thank you very much!