PDFBox Pdf to Image losing QR Code “ColorSpace Pat

2019-01-20 18:39发布

问题:

Similar to this SO PDFBox - PDF to Image losing barcode

The PDF in question: https://drive.google.com/file/d/0B13zTPQR9uxscXRMWjhsZ0doa00/view?usp=sharing

There is minimal text, and a medium sized QR Code. I have tried many different solutions to convert this PDF page to an image using PDFBox/ImageIO, but so far the QR Code is always missing from the result.

When I use PDFBox's PDFImageWriter I get this log:

ColorSpace Pattern doesn't provide a non-stroking color, using white instead!

I'm thinking that pertains to the QR Code.

Is this expected behavior? Can someone else confirm PDFBox cannot copy the QR Code from this PDF? Is there any way to convert this to an image using Java or PDFBox?