J-F-Liu / lopdf

A Rust library for PDF document manipulation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The image generated using qrcode has become corrupted

xspio opened this issue · comments

When a qrcode image is generated using qrcode-rust(https://github.com/kennytm/qrcode-rust) and then inserted into a exist PDF, the qrcode within the PDF becomes unreadable or corrupted

let img = xobject::image("./qrcode.png").unwrap(); doc.insert_image(page_id, img, (100.0, 300.0), (100.0, 100.0)).unwrap();