techprimate/TPPDF

QR Code Image insert into .headerRight

AlexLojewski opened this issue · 2 comments

Hello and thanks for your nice framework,

i have a little app update from Xcode 11 to Xcode 13 and the newest TPPDF Version. In the old version from my app i generate a string into a qr code image:

func generateQRCodeImage(from string: String) -> UIImage? {
        let data = string.data(using: String.Encoding.ascii)
        
        if let filter = CIFilter(name: "CIQRCodeGenerator") {
            filter.setValue(data, forKey: "inputMessage")
            let transform = CGAffineTransform(scaleX: 3, y: 3)
            
            if let output = filter.outputImage?.transformed(by: transform) {
                return UIImage(ciImage: output)
            }
        }
        return nil
    }

after that i put it in the pdf:

qrCodeImage = generateQRCodeImage(from: checklist.qrCode) let qrCodePDFImage = PDFImage(image: qrCodeImage!, caption: nil, size: CGSize(width: 75, height: 75), quality: 1.0, options: .none, cornerRadius: .none) document.add(.headerRight, image: qrCodePDFImage)

in the old version the image load it in the right corner.

in the new version after the add i see nothing. when i add the image so:

document.add(image: qrCodePDFImage)

i see a bigger placeholder between rows but no qr code image.

TPPDF Environment new App Version

TPPDF version: 2.3.5
Xcode version: 13.x
Swift version: 5

TPPDF Environment old App Version

TPPDF version: 1.5.4
Xcode version: 11.x
Swift version: 4

This is in fact very weird.

As there hasn't been any activity from me, you or anyone else in over a year, I will close this issue due to inactivity for now.

If you still have this issue (or anybody else), feel free to reopen it.
Thanks for reporting!

Same issue here