Description: When import pdf file with image fill shape, the image may overflow and display incorrect Steps to Reproduce: 1.Use writer create new file and insert a rectangle 2.Fill the rectangle area with pattern or image 3.Export to pdf file 4.Open pdf with Draw and observe Actual Results: The image shown outside of the shape area. Expected Results: The image should tile correct and inside the area Reproducible: Always User Profile Reset: No Additional Info: Version: 25.2.1.2 (X86_64) / LibreOffice Community Build ID: d3abf4aee5fd705e4a92bba33a32f40bc4e56f49 CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win Locale: zh-CN (zh_CN); UI: en-US Calc: CL threaded
Created attachment 199944 [details] import pdf display incorrect
Created attachment 199945 [details] example pdf
Hmm, confirmed thanks. Interesting test PDF, a clipping mask issue. Duplicate of bug 86211? No improvements with recent PDF filter effort in 2025-03-19 master against 25.8.0 Note: the Insert -> Image (pdfium based filter) does handle the clip mask correctly in LibreOffice if that supports your work flow working with PDF pages. =-testing-= Version: 25.2.1.2 (X86_64) / LibreOffice Community Build ID: d3abf4aee5fd705e4a92bba33a32f40bc4e56f49 CPU threads: 28; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 4957d832c76598e78a57324dad5b4de7345a33e2 CPU threads: 28; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded
It's another clip issue, it caused by pdfimport convert the shape to a clip path and a series draw image. But the PDFIProcessor didn't handle the clip path correctly. I have not find way can clip the ImageElement. And it's seems tilingPatternFill can clip it, I need more test if we use tillingPatternFill for all draw image.
Yeh that doesn't surprise me too much; there's very little clipping code in there; until a few months ago there was almost no clipping; I added simple line and fill clipping a while ago. Could you attach the Libreoffice file you used to create the PDF? I'm curious what the primitives inside that look like, then we'll know what we need to get the PDF importer to generate.
@zllangty, Needinfo is back to you. Would you please attach the source Writer ODF document you used to generated attachment 199945 [details] Thank you!
Created attachment 199967 [details] source Writer ODT for 199945 It just a normal rectangle
Right that makes sense
Created attachment 199968 [details] Fix tiling image shape import I made a patch, use tillingPatternFill when the image need be clip. That make sure the image always inside the shape. But it a little bit dirty. May we should merge these drawImage and use tiling fill a path.