I recently learned that we can embed a whole PDF file into QR codes. But many online sites are not free for this service.

Just wondering if Mathematica can do this? Note I don't want to convert the file into images, then into QR. I would like to preserve the PDF format in the QR code when it's scanned.


  • 3
    $\begingroup$ PDFs generally seem to be too large to be encoded as QR codes. I encoded a two page PDF in the base64 format, and the resulting string is 291,144 characters long. Meanwhile, the documentation for BarcodeImage suggests that the limit for a QR code is 2953 ASCII characters. So, I'm not really seeing how this could work. Perhaps the websites use a generalized form of QR codes? Perhaps they extract the text and encode only that? Could you give a link to one of these websites? $\endgroup$ – C. E. Sep 29 '18 at 22:32
  • 2
    $\begingroup$ Are you sure they encode the whole PDF? Not just a url to the PDF online? $\endgroup$ – Niki Estner Sep 30 '18 at 7:10
  • $\begingroup$ Hmmmm now if I Tobi know about it, it could be just a url link to the PDF... I will test more and update you here. $\endgroup$ – Chen Stats Yu Sep 30 '18 at 11:31
  • $\begingroup$ qr-code-generator.com/solutions/pdf-qr-code This is the one I used. But it looks like only thing embedded was a url link. $\endgroup$ – Chen Stats Yu Sep 30 '18 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.