How to OCR to searchable PDF in Linux
By searchable PDF, we refer to a scanned PDF document that contains invisible OCR'ed text over the scanned image. The text should have the right size in order to be placed over the text portions from image. Every word from the text layer should overlay exactly on the portion of the image that contains that word.
Here are two software solutions that are able to create searchable PDFs. One is a native Linux OCR engine and the other is a free PDF reader with OCR capabilities running in Wine.
How to compile and set up Dream DRM on Ubuntu
So I decided to build from source. Dream needs Qt development kit and some other libraries. For audio decoding and encoding, AAC libraries are needed. These are available in repositories, but most of the time they are compiled without DRM support. I will show you how to compile them with DRM support and make Dream detect them.
Update: Tested and working on Ubuntu 16.04 and 16.10.
The instructions below are based on the official instructions on Dream website. I updated them to work with newer Ubuntu releases and I also added a Desktop entry, so you can launch Dream from Dash. It should be noted that the source compiles on Qt5, yet Dream doesn't work (segmentation fault).
Wine 1.8 is available in Wine Team PPA. Install it now!
Wine 1.8 has been succesfully built and is now available from the Wine Team PPA (until today, it was only available in wine-builds PPA under a different package name: wine-devel). To install it, all you have to do is add the PPA to your software sources and install wine1.8 package.
3 Ways to remove PPAs on Ubuntu
Most of the time there's no need to use a PPA, because common software packages are already in the official repositories. But for custom builds, latest versions or simply packages that you can't find in the default repositories you need to use a PPA.
Sometimes, a PPA may not be needed anymore. Maybe the package from PPA has been added or updated also in the default repositories. Or you plan to upgrade the OS to a newer version and the packages for this version weren't yet built in the PPA (to prevent errors in this situation, Ubuntu automatically disables third party PPAs when upgrading). Or the PPA may not be maintained anymore and you get errors when updating apt cache.
How to add printer marks and bleeds to PDF documents
This tutorial has been made on Linux, yet the tools that I'm gonna use are cross-platform and free, so you can try it on other operating systems too. In short, to add printer marks and bleeds to a PDF document, you should generate a marks and bleeds only PDF for the source document page size, then increase pages size of the source document and at last overlay the marks and bleeds document.
3 Ways to install VirtualBox in Ubuntu
This post will describe three installation procedures for Linux (Ubuntu). You can install VirtualBox from the default repositories, from Oracle repositories or from deb file. Each has its advantages and disadvantages. Of course, the best method is the one that brings you the best results.
VirtualBox main window |
HF & VHF antenna amplifier without coils
The following receiving amplifier can be used for any kind of signal in the HF and VHF bands from about 1 MHz to 400 MHz. It offers quite linear gain across this band width without using any LC tuned circuits. Therefore it can be used for shortwave, FM and VHF signals and even AM band can be received, because the gain at 500 kHz is not less than 18dB. The circuit does not use coils. However, a choke will be required if you will power the amplifier through the feed cable. The circuit uses five RF transistors with a cut-off frequency of at least 600 MHz. The PCB is designed for the (S)S9018 transistors (EBC pinout), but you can use any kind of low power RF NPN transistors, like MPSH10 and even the old types like BF200 or BF214 (pay attention to pinout). S9018 transistors are cheap and widely available (you can find them in transistor packs).
The amplifier's input is unbalanced and it can be connected to any kind of antenna (after the balun if it is necessary). Because Q5 is placed in a common base configuration, the input impedance is high, thus the amplifier can be used with whip antennas too (they usually have high impedance at low frequencies). The output is 75 ohms unbalanced. The overall gain of this amplifier is 20 dB.
How to install Ubuntu from Minimal CD (with UEFI)
This has advantages and disadvantages. If you have a fast internet connection, this is actually a good way of installing Ubuntu or any of its official derivatives like Kubuntu, Xubuntu, Lubuntu or Ubuntu MATE. You will only get the packages you requested at their available versions from the repositories. This means that once installed, your OS will be updated. The disadvantages are of course related to the internet connection. The minimal ISO cannot boot in EFI mode yet you can make it EFI bootable. Also, the text installer may be a little difficult for inexperienced users.
This tutorial shows how to make an EFI bootable media from Minimal ISO and also how to install Ubuntu from it whether you're in EFI mode or not.
The ISO is less than 40 MB, thus it can be burned even on 80 mm CD or you can make a bootable flash drive. This is the perfect choice for any old, low speed USB flash drive. In order to make the bootable USB drive, you can use Rufus on Windows and dd command on Linux. You can get the Minimal ISO at http://cdimage.ubuntu.com/netboot/.
Set up the serial port in Wine
Another issue is that modern computers no longer have serial ports. But this can be easily solved by using a USB-to-serial adapter when you need a serial port.
Windows detects and names serial ports as COM1, COM2, COM3, etc. It doesn't make the difference between genuine ports or USB adapters. Linux on the other hand names hardware ports as /dev/ttyS0, /dev/ttyS1, /dev/ttyS2, etc. and USB adapter ports as /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2, etc.
[Video] Render 3D images of EAGLE PCB projects
If you haven't read about this before, EAGLE is a schematic capture and circuit board design software. The circuit boards can be processed with a set of scripts and converted into POV-Ray files. In this way you can render great looking 3D pictures of the circuit boards. All used software is available for all major operating systems. The video presents only Linux Ubuntu installation and configuration.
3 Large image viewers for Linux
So I tried to open them with the default associated program (Eye of GNOME) and before any image was displayed, my 2 GB RAM computer started swapping to make room for eog process. Therefore I needed other image viewers.
Here is a comparison of some free image viewers that run on Linux and can display large images using low RAM. I compared two features: speed of zooming/panning/dragging and memory usage. I used my two images for comparison, thus 44 MP displayed as RGB takes (8772px * 5020px * 24bpp) / 8 / 1024 / 1024 = 126 MB and 140 MP takes (24193px * 6489px * 24bpp) / 8 / 1024 / 1024 = 450 MB.
Therefore any viewer that uses more than RAM than the uncompressed RGB image size is useless for large images.
How to install WinUSB in Ubuntu 15.10
Update: These instructions are not for Ubuntu 16.04 LTS and newer. The only way to get it working in Xenial and above is to compile after patching the source code to work with wxWidgets 3.0. It is described in detail here.
There are currently some issues with the available builds of WinUSB:
- wrong dependencies: some older versions depend on grub package while Ubuntu uses grub-pc or grub-efi. Installing WinUSB as usual will force grub-pc or grub-efi removal thus rendering your computer non bootable.
- deprecated grub-install method. WinUSB uses the --root-directory argument to specify GRUB install location while it is recommended to use --boot-directory.
- Unspecified bootloader type. There is no --target argument for grub-install so you don't know whether a MBR bootloader or an EFI one will be installed.
- The previous issue raises a limitation. If GRUB decides to use the EFI bootloader, it will install it in a NTFS partition (that's how WinUSB formats the flashdrive) which makes it useless.
Free EDA: Easy circuit board design with ExpressPCB
ExpressPCB is very easy to use and one of the features I like most is that it is very easy to make new footprints. You don't even need to leave the current PCB design window. You just draw the footprint using predefined pads and shapes then group all elements into a component footprint. That is all. If you want this to be available in other projects, you just add it to library.
There are also some downsides. The export dialog is quite limited and you can't directly export mirrored layouts. However there is a workaround that I will show you.
How to align satellite dish
Free EDA: Good looking schematics using TinyCAD
I have chosen TinyCAD because it has quite powerful drawing abilities for a schematic capture software and I found it quite easy to make my own symbols. More than that, it can export netlists that you can use to design the PCB later (I will not be using this feature though).
I have tried TinyCAD before and I quit using it because I didn't like how the schematics look. There are plenty of libraries with many symbols, but there are also duplicate symbols that look different in other libraries. Some look good, some don't. I didn't actually start to use TinyCAD until I made my own libraries that I'm gonna share with you at the end of this post.
Free EDA: Design and simulation with LTspice
Before drawing the schematic and designing the PCB we need a circuit idea. Then we will use the free circuit simulation software LTspice to simulate our design. This is what this article is about. LTspice is developed by Linear Technology and it runs native in Windows and Mac OS X. The Windows version runs without issues on Linux using Wine.
This is not a LTspice tutorial. For that we recommend Terry Sturtevant's and Simon Bramble's tutorials. You will also need electronics knowledge. See All About Circuits, Learn Electronics Online or Learn About Electronics.
Make a wideband antenna matching transformer
Most do-it-yourself TV antenna projects I could find use a readymade impedance matching transformer between antenna and cable. But what should you do if you can't find one at your local supplier? Let's attempt to make one with nothing more than some copper wire and a ferrite core. You could use some hard to find double hole pig-nose RF ferrite cores, but this transformer performed fairly good with ordinary toroidal cores.
This matching transformer can be used for VHF and UHF reception (from 50 to about 800 MHz). The input is 300 ohms balanced and the output is 75 ohms unbalanced, ready for coaxial cable connection. I found out that a device similar to what is presented here is used in commercially available antenna preamplifiers with 300 ohms input.
UEFI NTFS: Bootable Windows USB from Linux
The procedure that is about to follow should work with any Windows version that supports UEFI boot (Windows 7 on 64 bits and all the newer versions). It has been successfully tested only in VirtualBox but it should work on real hardware too.
We will make two partitions on the USB drive, one that is FAT32 and will hold an EFI bootloader and the other is NTFS and holds Windows installation files. The bootloader will use a NTFS driver to read the NTFS partition and boot Windows.
Change mouse cursor theme in Ubuntu
In order to have a consistent cursor theme you must select it from one of these apps and also run a command in Terminal. First, the command. This is the most important and you may not even need to change the cursor theme from those apps too.
sudo update-alternatives --config x-cursor-theme
Safely try new kernels in Ubuntu Linux
Here is what I recommend doing before trying a new kernel:
Add page numbers, headers and footers to PDF in Linux
sudo apt-get install scribus pdftk pdfchain gimpFirst of all you need to gather some information about the document you want to add content to. Using your favorite PDF reader or any other PDF information software find out the number of pages and their size. In order to know where to place headers/footers pick a content representative page from the PDF document that you will later use as a template to avoid overlaying header/footer with document contents.
Free PDF manipulation software for Linux
I will use throughout this tutorial only free software (probably most are open source too). I will avoid as much as possible using CLI software from the command line because most new Linux users are afraid of this. Although I will remind what backends are used to perform certain operations.
If you got a bunch of scanned pages as images and you want to turn them into a PDF I already discussed that in the post High quality scanning vs. small file size. For now I will focus on what you can do with an existing PDF.
10W Stereo Audio Amplifier with Transistors
Most audio amplifiers nowadays are built with special integrated circuits. These ICs are getting smaller, but the power they can deliver and efficiency are increasing. The following amplifier is a classic design built with common parts and some power transistors in output stages. It can deliver a maximum of 10 W into 4 ohms speakers on each channel when it is fed with a 0.5 V peak-to-peak signal. Input impedance is above 100 kilo-ohms. The amplifier should be powered from 24 V regulated supply.
The output transistors must be able to handle a collector current of at least 2 A and dissipate at least 20 W. Something like BD237 & BD238 or BD 437 & BD 438 pairs will do. The rest are general purpose transistors such as BC547, BC171, 2N2222, S8050, 2N3904 and their complementary BC557, BC177, 2N2907, S8550, 2N3906 (pay attention to pin order). The drivers of the power transistors, just like them, must be complementary and with similar current gain. So, if you have a hFE meter, it's recommended to test the transistors and match them based on hFE. If you can't measure them, follow the hFE markings. Do not match a BC547B with a BC557C because they have different gains.
Built channel amplifier (without heatsink)
2.5W Audio Amplifier with Transistors
This amplifier is easy to build using common discrete parts. A channel uses only four general purpose transistors (3 NPN like BC547, 2N2222, 2N3904 and 1 PNP like BC557, 2N2907, 2N3906) and two medium power complementary transistors like BD135/137/139 with BD 136/138/140 or MJE200 with MJE210. Almost any pair of complementary transistors will do as long as hFE is greater than 60, maximum collector current at least 1 A and dissipation at least 10 W.
The power transistors must be fitted on a heatsink! They have their collectors electrically connected so you don't have to isolate each other. The heatsink should have an area of at least 40 square centimeters. Note that the heatsink voltage is neither ground or supply voltage so do not connect it with anything else besides transistors. Be careful not to connect it with chassis ground. If you build the other channel for stereo use, do not electrically connect the heatsinks of both left and right channels.
Make a multifeed LNB bracket for your satellite dish
Although a satellite dish is designed to receive signal coming from a single direction, by placing additional LNBs near the main one you will be able to receive more than one orbital position. Thus, each LNB will receive signal from a different satellite. You can receive in this way signal from satellites placed at near orbital positions. Having multiple LNBs fitted to a dish is called multifeed and it comes with advantages and disadvantages. The main advantage over a motorized dish is the fact that it is a fixed installation and you can change channels instantly without waiting for the antenna to move. However, the additional LNBs that are not placed in the middle focal point will receive lower quality signal than the main one.
Brackets for multiple LNBs are commercially available, but I found them rather... rigid. Most of them are for 2 or 4 LNBs and don't allow too much fiddling to get the best signal quality. Let's try to make that bracket. It must keep a constant focal distance and should follow the inverted reflection of Clarke orbit. The focal distance depends on antenna and orbit reflection depends on dish size, receiving location and satellite positions. The distance between LNBs is proportional with dish diameter. You will learn how these parameters affect the LNB bracket shape and size and how you can calculate distance between LNBs.
Photo courtesy of Paul Lucas on Flickr
Connect multiple satellite receivers to a single LNB
LibreOffice: bibliography management with JabRef
But with the help of the bibliography manager JabRef, things get more simple. It uses the BibTex file format, so the bibliographical databases made with it are compatible with LaTeX. It has a nice online search tool which can populate a bibliography entry with all the information based on ISBN for books or document ID for different papers. And most important it integrates with LibreOffice and OpenOffice, allowing users to insert a bibliography entry with a simple two-click operation.
Dual booting Windows and Ubuntu [MBR]
This post will give solutions to some common situations. Because Ubuntu is one of the most popular Linux distributions, it will be used during this tutorial.
Here are some common situations that we will talk about:
ScanTailor Fix DPI dialog
The Fix DPI dialog |
How to identify an unknown radio tuner
Gray-Hoverman, the wideband TV antenna
In the past, air TV channels were broadcast on frequencies ranging from 170 MHz to 860 MHz. The VHF-Hi band covers 175 to 230 MHz, while UHF covers 470 to 860 MHz. This is a large interval, covering two bands and it is difficult to receive with a single antenna. But, nowadays the UHF band for TV broadcasts is getting smaller. Frequencies starting from 600 MHz are being repacked for mobile networks.
The Gray-Hoverman antenna has been designed by Doyt R. Hoverman and it was patented in the sixties. It only covered the lower part of UHF, from 470 to 720 MHz (21 - 52 channels). If that could have been a problem, it's not anymore. The average gain in this frequency range is 13 dBi with reflector and 9.2 dBi without it. With some additional elements, this antenna can also receive the upper part of VHF from 170 to 230 MHz, with an average gain of 8.1 dBi with reflector and 6 dBi without it. The overall gain is not too much but, since it is easy to build and wideband it's worth a try. The original design has been republished and distributed according to the GNU GPL version 3 license.