This is happening to me when I download PDFs fom my Gmail app to any android device. I've tried it in different ones just to check it wasn't a specific phone problem and I realised it's not.
The only documents I download from Gmail that have either QR or barCodes ara always Tickets, concert tickets, theater tickets and whatever tickets I download I always have this issue. I've been having this problem for more than a year and by doing a little bit of research I've noticed that noty many people suffer from this.
It is very annoying to reach the 1st place in theater line, open your tickets PDF and make other people wait just because PDF app can't show Codes as it should.
I'm attaching 2 screenshots of how it looks in the mail app and the afterwards mess in the PDF app: