Create QR code in Ubuntu 16.04
How can I create QR codes in Ubuntu 16.04?
Solution 1:
I have tested two applications that worked well on Ubuntu 16.04 for creating QR codes:
-
If you want a simple command-line tool, I can recommend
qrencode
.It takes an output file name and optionally an input string as command-line arguments and produces a PNG file with the QR code. If no input string is given as argument, it reads from standard input, so you can either type into the terminal or pipe another command's output into it. There are also some more advanced options.
Install it with
sudo apt install qrencode
.The basic usage is
qrencode -o "output-file.png" "Your text here"
.
For more information seeman qrencode
.
-
If you want a user-friendly GUI tool, you should try
qtqr
.It offers you a clean user interface that allows you to select an input data type like e.g. URL, email address, phone number, WiFi credentials or plain text. You can easily select the pixel size, margin and error correction level and save in the formats PNG and SVG. It also allows you to scan and decode QR codes from image files or a webcam.
Install it with
sudo apt install qtqr
.
Now here's a screenshot showing how to create a QR code of my Ask Ubuntu profile URL with both tools (and using eog
on the right to view the image created by qrencode
, as it has no preview). Note that the created images are absolutely identical:
Solution 2:
Using Scribus
- Install and open Scribus
- In new Document dialog select Single Page
- From Insert menu at top choose Barcode
- Select QR Code from Type dropdown (You can expand this window if it is too small)
- Type in the text you want to encode in the Code input box
- Press OK and click to place a 'frame' which is Scribus-speak for an element on a page
- Resize the 'frame' as you want it
- Export the page as an image from File>Export>Save as Image...
- Crop the image in an image editor