How do I edit text in a scanned .jpeg?

Solution 1:

To make text in a .jpeg editable you need Optical Character Recognition (OCR) software. I use ocrfeeder.

sudo apt-get install ocrfeeder

To open an image file click on the 'plus' (+) sign.
enter image description here After you have opened the image, click on the next icon to the right to run OCR.
enter image description here
After is has finished OCR'ing the image, you can select the text you want on the left, and copy it out on the right.
enter image description here

The easiest way to get the text out is to just copy it over to LibreOffice. With a little editing, my copy looks very similar.

enter image description here

After you make the required changes you can export them as .pdf by clicking 'export as pdf' from the LibreOffice toobar. enter image description here

Ultimately its best to scan to .pdf if you can. If you can't this works very well.

NOTE: OCR is not 100% accurate, you may have to correct errors, and the more formatting your document has, the harder it will be.

Solution 2:

You can't edit text in a JPG, but you remove the text and add new text.

For images, try gimp (open source alternative to Photoshop). Open the image with gimp, then use the eraser tool to erase the old text. Then use the text tool to add new text.

Or, use inkscape, which is a vector graphics program (similar to Adobe Illustrator). Create a new SVG file and paste in your JPG. Then, cover up the old text with a new text box.

I would start with gimp but for your image maybe inkscape works better. You can install either code from the software center, or use these lines in a terminal

sudo apt-get install gimp

sudo apt-get install inkscape

Solution 3:

We can also edit text on top of an image with Libre Office from where we can also easily export this files as PDF.

  • Open your document to insert the image with Insert -> Picture -> From File....

    enter image description here

  • Then choose "Wrap -> In Background" from the right click context menu on the picture you just inserted.

  • Write any text above the image (but we will have to place it with newlines, and spaces or tabstops). Any preexisting text needs to be overwritten. In the example below I have done this by choosing a black background and a white font colour.

    enter image description here

  • Finally we can do "File -> Export as PDF...".