Is there a plain PHP implementation for decoding QR codes?
I have a faux-smartphone. One of those phones that parades as a smartphone but that I can't download any apps for, and I want to create an email service to where I can take a picture of a QR code, MMS it to this email, and the email returns what the QR code contains.
However, the only libraries I've been able to find are in Python (and probably C++), neither of which I can access on my limited hosting environment.
Is there a way to read QR codes using only PHP?
There is only one pure PHP QR code decoder. It's working with GD library, but can use also ImageMagick. This PHP QR code reader is ported from ZXing.
https://github.com/khanamiryan/php-qrcode-detector-decoder
I'm not aware of any pure php decoder. Decoding images like this is pretty processor intensive and doing it in a purely interpreted language is challenging.
zxing (http://code.google.com/p/zxing/) provides a decoder implementation in both Java and C++. In theory, it should be possible to link the C++ library as a php extension, though I don't know anything of the mechanics of that. I've done it for Ruby ...
Moreover, zxing does have an online decoder at http://zxing.org/w/decode.jspx. My thinking is that from PHP you can take the image and post it to the webservice and retrieve the decoded data. I don't know the mechanics of making remote web service calls from PHP and how different hosting environments might limit that, though, but it seems reasonable?
If you have the possibility to use a phpextension, php-zbarcode at https://github.com/mkoppanen/php-zbarcode can read qrcodes. It's a wrapper for ZBar from http://zbar.sourceforge.net, which in turn is a LGPL C library for decoding barcodes.
To decode your QR code you have to upload image of QR code and it will show you text inside that code image.
http://www.phpgang.com/how-to-decode-qr-code_344.html
Very easy to do tutorial I hope it helps.
Here is a good example & you can generate online direct QR code too...
there is also php library to implement QR code in your project.
http://phpqrcode.sourceforge.net/
Related
I am trying to implement QR code. i've successfully implement it using phpqrcode. However I don't know about how to decode the QR code using webcam and php or javascript. I've tried to search it on google, but can't find any solution for this. Anyone could help me? Thank you so much
you could use this jquery webcam plugin and then send the image to php-zbarcode. It uses zbar which can read qrcodes. Note that the plugin requires flash.
There is also jsqrcode which you could use to scan and interpret the QR Code, however this requires HTML5 for displaying the webcam output, and flash for capturing.
Here is a previous question pertaining to javascript-only solutions
i've been searching for quite a long now to convert a word document (.doc & .docx ) to pdf.....my application is about taking a word document from clients than converting them to a pdf with added changes ( like header, footer ) to the original document.
Any suggestions are welcomed.
Thank you
Look at http://www.phplivedocx.org/ for converting DOC to PDF.
Example code with nusoap, http://www.phplivedocx.org/articles/using-livedocx-with-nusoap/
You can call the Docmosis Cloud Services from PHP using a http post or curl command. It supports doc and docx imports and pdf outputs. It's more intended to perform document manipulations than conversions but perhaps that suits you even better. Please note I work for the company that created Docmosis.
Hope that helps.
This is a year old, but for people still looking I found a link to a pretty decent api you can look at and see if it works for your needs.
https://cloudconvert.org/page/api#overview
Essentially you use their api and a key they provide when you sign up for an account. Send all the data for conversions to their servers then get the return. You can then store it on your own computer, the users computer, or a server of your choosing. There is some minimal set up and sign up processes and their Github account walks you through pretty easily.
Check it out and hopefully it is a good choice.
We need to install below libraries on server for convert DOC file format to PDF file format:
(Libre Office OR Open Office) and Unoconv librarie
I've programmed an uploadscript for uploading PDF files. Via PHP I want to check if the uploaded files are ready for print using the X3 standard. That means images and fonts has to be embedded into the file etc.
Unfortunately I don't know how to achieve my aim? Does anybody has some ideas that might help me?
I'm assuming you are referring to the ISO PDF/X-3 standard? Are you sure it has to be PDF/X-3 you need to check against? Most publishing workflows today use something based on either PDF/X-1a (the vast majority) or PDF/X-4 (up and coming).
How do you want the checking? There are a number of commercial libraries that allow you to PDF/X-3 checking (and other PDF preflight), do you want to use those or are you looking at implementing this yourself using some PHP library?
If you want to use an existing library, let me point you at pdfToolbox from callas (warning, I am affiliated with this company) which has a command-line version that is easily usable from PHP (I made such an implementation with Drupal). There are definitely other companies that have technology in this area too, Enfocus comes to mind.
If you want to use a PHP PDF library to do this, be aware that PDF/X-3 checking goes much further than having all images and fonts embedded. There are a lot of very subtle requirements you'll have to implement.
I want to generate/read the data to/from a QR code. I don't want to develop a QR generator/reader of my own.
Are there any plugins/webservice etc which I can use readily at my website??
I'm using PHP.
We have used this:
http://phpqrcode.sourceforge.net/
for a voucher system for a British newspaper. It works very well and has good documentation.
I'm doing a bit of preliminary research on an upcoming project and I have a quick question that I figure I'll throw up here while I look elsewhere, in case anyone has any experience with this.
The question is simple: is it possible to read a QR code using JavaScript? Is there a remote service to which I can pass a bitmap object from a camera and do it that way? Are there currently any libraries that allow this?
The project is going to be deployed to various mobile devices and we'd like to try to use Appcelerator to make it work. I know Appcelerator does expose the Camera API on its host devices, but whatever we do with it has to be able to parse QR codes. Is this something that can be done?
Thanks in advance!
myk
I bet it's possible, but it would be a challenge. Someone's written an AS3 library for reading QR codes. I'd start by reading up on image manipulation in Canvas.
If you go down the remote API route, Kaywa have an API you may be able to use.
You can use the getUserMedia API to get video from the webcam and you could put it into a canvas element and use the canvas to read the pixels and decode a QR code.
I don't know of a library to decode QR codes but here is one library that can do bar codes.
There's a javascript library already, however the comments are mostly in Japanese and there's no documentation.
Because of memory limits for JavaScript on mobile devices, it's likely to take too long for practical use, if it is possible with purely JS.
I don't know exactly how the Appcelerator API works with external native libraries, but your best bet is to pass the image data to the native code (Objective-C or Java) and then use a lower-level library (like iphone-qrcode) to parse the QR code, then pass the result back to the JS execution context.
This has the added advantage of working offline, which a remote service could not do.
If you want a proof-of-concept, then here it is - a motion tracker written in pure Javascript.
However, support for it is not widespread right now. Only FF and the latest Webkit builds support it afaik.
Just noticed that you wanted this for a mobile device. Then absolutely go with a remote service. It will be really taxing even on the most high end devices assuming they even support it, which I highly doubt.