There are several ways to do that. Though all my suggeed ways have one problem they won't really flatten your picture. A more or less good picture would be still required.
One easy way is that you try the software ScanTailor (scantailor.org)
sudo apt-get install scantailor
It takes you through 6 steps to optimize your photos. At the last step you can select the option "Equalize illumination" this will give you a nice clean look!
Personally I usually just use GIMP. But you need some basic skills to reach your aim.
sudo apt-get install gimp
- crop the picture in the wanted way
- use the
Colors
-> Curves
option to manipulate the color output in a way you want it...
Another nice little program is gscan2pdf, where you can also load photos and export them as PDF. There is is even a link to GIMP so you can improve the photo with the above described steps.
sudo apt-get install gscan2pdf
What I do is the following --- it is not as versatile as you asked, but it works almost ok. You need to have all your printers defined, and then you need these two scripts:
stop_printers
:
#!/bin/bash -f
#
allp=(`cat /etc/printcap | tr "|" "\t" | cut -f 1 | grep -v "#"`)
for i in ${allp[@]}; do
echo -n Printer $i:
cupsdisable "$i"
echo " " paused.
done
start_printers
:
#!/bin/bash -f
#
allp=(`cat /etc/printcap | tr "|" "\t" | cut -f 1 | grep -v "#"`)
for i in ${allp[@]}; do
echo -n Printer $i:
cupsenable "$i"
echo " " restarted.
done
You have to put them in your path (for example ~/bin
) and make them executable with chmod +x
. CAVEAT: I do not have any printer with spaces in their names. The scripts are not tested in that case (but I am sure that one of our shell script's gurus will fix the scripts in a flash ;-)... )
Now, you can issue:
[romano:~] % stop_printers
Printer PDF: paused.
Printer ColorDEA: paused.
Printer Deskjet_6980: paused.
Printer fotocop5: paused.
And you can print from wherever you want, the printer will be paused:
You can see your queue:
[romano:~] % lpq -PDeskjet_6980
Deskjet_6980 is not ready
Rank Owner Job File(s) Total Size
1st romano 439 Bones_3+RG.pdf — Flesh depth 125952 bytes
(AFAIK, the print queues are persistent across reboots). And when you want to print:
[romano:~] % start_printers
Printer PDF: restarted.
Printer ColorDEA: restarted.
Printer Deskjet_6980: restarted.
Printer fotocop5: restarted.
Using lprm
you can remove a job if you need to; lpr
to enqueue a document via command line, and if you want different "lists", no one forbids defining the same printer several times with different names.
You can also resume each printer by hand, it's just a matter of running cupsenable <printername>
from the prompt.
What I do not think you can do with this solution is changing the print options after the fact --- you will have to dequeue and re-enqueue the document for this.
Best Answer
A right-click solution can also be nice in that it is faster and works also if you are off line.
No desktop environment was specified in the original question, so this answer will also be generic. Several file managers allow to define custom actions, which then can be executed by right-clicking the file.
A basic script to convert a PDF to jpg can be a one liner using one of several tools available. Using imagemagicks convert for example:
will convert input.pdf into one or multiple jpeg files, sequentually numbered in the latter case.
Then it will depend on the file browser how this command can be incorporated into a script, and what placeholders need to be given to have input.pdf automatically substituted by the actual file name. For the default filemanager of Ubuntu 18.04, a how-to about adding your own script is provided here. A more powerful option that is not officially supported by the nautilus developpers, is provided by filemanager-actions. Users of Thunar can start here.