Created attachment 132398 [details]
See the attached document; it has a pdf image where object #5 has a nested /Foo -> /Bar dictionary key with a reference. When copying that to the pdf export result, we copy that reference as-is, so the output becomes invalid.
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":
tdf#107018 PDF export of PDF images: handle references in nested dictionaries
It will be available in 5.4.0.
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.