Created attachment 62394 [details]
Patch that fixes the issue, no idea how correct it is ...
When an image rendered using EXTEND_PAD and clipped at the same time it may be rendered at the wrong position.
The specific usecase that happened for me was rendering part of a PDF (scanned document) into a new PDF surface using popplers render() function (not render_for_printing because of bug #44002.
I'll attach a patch that fixes the issue for me. It seems that the offset is set on the created image surface in _cairo_pdf_surface_add_padded_image_surface, however it is then not used inside _cairo_pdf_surface_add_source_surface.
I've fixed the bug with a different patch. The problem with using cairo_surface_get_device_offset internally is that images passed to the pdf backend have already had the device offset applied to the pattern matrix. And we don't want to apply the offset twice.