Inhalt

Vorwort

JFotokopie ist eine Java Anwendung, sie kann benützt werden, um auf Gerät A zu scannen, und auf Gerät B auszudrucken.

Die Befehlszeile vom Scanner muss normal etwas angepasst werden.

Download JFotokopie

Man bekommt es hier http://wiki.ubuntuusers.de/JFotokopie/JFotokopie.tgz

Wünsche an den Entwickler

Scanmodus

Je Scanmodus (Letter,Gray,Color) eine eigene Scannzeile im $HOME/.JFotokopie.properties, da die Scanner nicht immer alle Optionen auf die andern Modis übernehmen können. Folge, Abbruch des Scannvorgangs.

Oder drei vier Regler, --threshold (andere Drucker --BRIGHTNESS ) --threshold-curve --gamma-table --gamma, und irgendwie Checkboxen dazu pro Modus. (Die Checkbox Defaults pro Modus sollten auch in die .JFotokopie.properties)

Ausgabedrucker

Ein Default Printer wäre cool in der .JFotokopie.properties, die andern immer noch anwählbar per Maus.

Installation

Ein kleiner install.sh in JFotokopie, der sich selber wie in Systemweite Installation installiert.

Installation

Benützer Installation

Wenn openjdk (Java Runtime) installiert ist, kann man es als User in sein Home entpacken. Dazu das LIESMICH lesen in JFotokopie.

Systemweite Installtion

Ich mach es aber lieber an einem Systemweiten Platz. Alle Schritte als root ausführen, resp. sudo.

Ich entpacke es nach /opt/java/JFotokopie-0.7 , dann Berechtigung setzen für den Ordner: chmod 755 /opt/java/JFotokopie-0.7

In der /opt/java/JFotokopie-0.7/.JFotokopie.properties unbedingt noch diese Anpassung vom Kopien Ordner anpassen. Weitere Anpassungen kann man machen wie Gerätespzeifische Scanimage Commando.

TEMPFILEPATH=~/tmp-copies/     (der ist Wichtig)

Startscript für die Benützer

Erstellen dieses Starters dafür:

Anlegen: /usr/local/bin/jfotokopie

/!\ Das erste Zeichen darf kein Leerzeichen sein beim speichern!

 #!/bin/sh
#
# Starter for JFotokopie
#
# 
# Required: Java Runtime (Java or openjdk) and JFotokopie
# JFotokopie is to save to /opt/java/JFotokopie-0.7
# chmod 755 /opt/java/JFotokopie-0.7
#
# Installation:
# Save to /usr/local/bin/jfotokopie
# chmod 755 /usr/local/bin/jfotokopie 
#


#Create tmp Folder
mkdir -p $HOME/tmp-copies
#User have a properties file?
test ! -f $HOME/.JFotokopie.properties && cp /opt/java/JFotokopie-0.7/.JFotokopie.properties $HOME && chown $USER.$USER $HOME/.JFotokopie.properties 

#run
java -jar /opt/java/JFotokopie-0.7/JFotokopie.jar
exit 0

Benützer

Der Benützer kann dann im Hauptmenu (meistens alacarte) sich einen Start Knopf anlegen dafür.

Name: Copy
Command: /usr/local/bin/jfotokopie

Und irgend ein Scanner icons (/usr/share/icons wo)

Konfiguration

Vorgehensweise

Der Beützer kann das selber machen, oder root macht es in die /opt/java/JFotokopie-0.7/.JFotokopie.properties, wenn die Geräte immer die gleichen sind.

Der Benützer kann in einem Terminal zum Test das Ding mal starten mit:

sh -x /usr/local/bin/jfotokopie

Dann sieht man schön die Rückmeldungen von allem. Und ein Error vom Scanner wird erkannt, wenn Optionen in der scanimage nicht kombinierbar sind mit dem gewünschten Scanmodus (Letter,Gray,Color).

Scanner Befehlsliste abfragen

Zuerst den Scanner finden mit (in einem Terminal): scanimage --l

testuser@testserver:~$ scanimage --l
device `v4l:/dev/video0' is a Noname HP TrueVision HD virtual device
device `pixma:MG6400_192.168.0.9' is a CANON Canon PIXMA MG6400 Series multi-function peripheral

Meine Laptop Webcam zuerst, dann der Scanner.

Jetzt fragen wir den Scanner MG6400 nach seiner Befehlsliste: scanimage --help -d pixma:MG6400_192.168.0.9

testuser@testserver:~$ scanimage --help -d pixma:MG6400_192.168.0.9
.
.Normal Info von scanimage lasse ich hier mal weg
.
.
Options specific to device `pixma:MG6400_192.168.0.9':
  Scan mode:
    --resolution auto||75|150|300|600|1200dpi [75]
        Sets the resolution of the scanned image.
    --mode auto|Color|Gray|Lineart [Color]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --source Flatbed [Flatbed]
        Selects the scan source (such as a document-feeder). Set source before
        mode and resolution. Resets mode and resolution to auto values.
    --button-controlled[=(yes|no)] [no]
        When enabled, scan process will not start immediately. To proceed,
        press "SCAN" button (for MP150) or "COLOR" button (for other models).
        To cancel, press "GRAY" button.
  Gamma:
    --custom-gamma[=(auto|yes|no)] [yes]
        Determines whether a builtin or a custom gamma-table should be used.
    --gamma-table auto|0..255,...
        Gamma-correction table.  In color mode this option equally affects the
        red, green, and blue channels simultaneously (i.e., it is an intensity
        gamma table).
    --gamma auto|0.299988..5 [2.2]
        Changes intensity of midtones
  Geometry:
    -l auto|0..216.069mm [0]
        Top-left x position of scan area.
    -t auto|0..297.011mm [0]
        Top-left y position of scan area.
    -x auto|0..216.069mm [216.069]
        Width of scan-area.
    -y auto|0..297.011mm [297.011]
        Height of scan-area.
  Buttons:
    --button-update
        Update button state
  Extras:
    --threshold auto|0..100% (in steps of 1) [inactive]
        Select minimum-brightness to get a white point
    --threshold-curve auto|0..127 (in steps of 1) [inactive]
        Dynamic threshold curve, from light to dark, normally 50-65

Dann kann man damit herausfinden was für Befehle in die $HOME/.JFotokopie.properties scanimage Zeile gehören. Ich habe Brigthness entfernt bei mir, aber die Variable $BRIGTHNESS benütze ich noch, aber für --gama jetzt.

Konfiguration Beispiel Canon MG6450

$HOME/.JFotokopie.properties

#JFotokopie Konfigurationsdatei

VERSION=0.7

SOURCE_SIZE_1=A4,-x 210mm -y 297mm
SOURCE_SIZE_2=A5,-x 148mm -y 210mm
SOURCE_SIZE_3=A6,-x 105mm -y 148mm

TARGET_SIZE_1=A4,-w 8.26 -h 11.69
TARGET_SIZE_2=A5,-w 5.82 -h 8.26
TARGET_SIZE_3=A6,-w 4.13 -h 5.82

COLOUR_1=Schwarz-Weiss,--mode Lineart
COLOUR_2=Graustufen,--mode Gray
COLOUR_3=Farbe,--mode Color

RESOLUTION_1=Niedrig,--resolution 150
RESOLUTION_2=Mittel,--resolution 300
RESOLUTION_3=Hoch,--resolution 600

BRIGHTNESS_MIN=0.3
BRIGHTNESS_MAX=5
BRIGHTNESS_STEP=0.01

SOURCE_SIZE=A4
TARGET_SIZE=A4
COLOUR=Schwarz-Weiss
RESOLUTION=Mittel
BRIGHTNESS=1.00
NUMBEROFCOPIES=1

TEMPFILEPATH=~/tmp-copies/
ARCHIVE=true

SCAN_COMMAND=scanimage -d pixma:MG6400_192.168.0.9 --format tiff $COLOUR $RESOLUTION --gamma $BRIGHTNESS -l 0 -t 0 $SOURCE_SIZE
CREATE_PRINT_PREVIEW_COMMAND=convert $INPUTFILE -resize 1024x768> $OUTPUTFILE
CONVERT_TO_PS_COMMAND=tiff2ps 3 $TARGET_SIZE $INPUTFILE
PRINT_COMMAND=lpr -P$PRINTER -r -\#$NUMBEROFCOPIES $INPUTFILE
COMPOSE_COMMAND=convert $BACKGROUND_IMAGE $OVERLAY_IMAGE -compose multiply -composite $OUTPUTFILE
EMAIL_COMMAND=/usr/bin/thunderbird -compose attachment=\'$INPUTFILE\'

VISIBILITY_SOURCE_SIZE=true
VISIBILITY_TARGET_SIZE=true
VISIBILITY_COLOUR=true
VISIBILITY_RESOLUTION=true
VISIBILITY_BRIGHTNESS=true
VISIBILITY_NUMBEROFCOPIES=true
VISIBILITY_OPTIONS=true
VISIBILITY_EMAIL=true
VISIBILITY_PRINTER=true

LABEL_SOURCE_SIZE=Größe der Vorlage
LABEL_TARGET_SIZE=Größe des Ausdrucks
LABEL_COLOUR=Farbe
LABEL_RESOLUTION=Qualität
LABEL_BRIGHTNESS=Helligkeit
LABEL_DARK=Dunkel
LABEL_BRIGHT=Hell
LABEL_NUMBEROFCOPIES=Anzahl Kopien
LABEL_COPY=Kopieren
LABEL_OPTIONS=Weitere Einstellungen
LABEL_ARCHIVE=Diese Fotokopie archivieren
LABEL_PRINT_PREVIEW=Druckvorschau
LABEL_PRINT=Drucken
LABEL_DONT_PRINT=Druckvorschau schließen ohne zu Drucken
LABEL_EMAIL=Per Email versenden
LABEL_PRINTER=Drucker

Angepasst habe ich davon:

Die Variable BRIGHTNESS arbeitet neu für --gama, ich benütze einfach die Variable weiter.
BRIGHTNESS_MIN=0.3
BRIGHTNESS_MAX=5
BRIGHTNESS_STEP=0.01

BRIGHTNESS=1.00  (Der Startwert davon, der ist immer gut bei mir)

TEMPFILEPATH=~/tmp-copies/

Anstatt:
SCAN_COMMAND=scanimage --format tiff $COLOUR $RESOLUTION --brightness $BRIGHTNESS -l 0 -t 0 $SOURCE_SIZE
Neu:
SCAN_COMMAND=scanimage -d pixma:MG6400_192.168.0.9 --format tiff $COLOUR $RESOLUTION --gamma $BRIGHTNESS -l 0 -t 0 $SOURCE_SIZE

Befehlssätze Scanner

Vorwort

Hier könnte Ihr eure Befehlssätze ja auch mit eintragen. (Am besten am Ende mit kleinem Kommentar, was man kombinieren kann)

Canon MG6450

Options specific to device `pixma:MG6400_192.168.0.9':
  Scan mode:
    --resolution auto||75|150|300|600|1200dpi [75]
        Sets the resolution of the scanned image.
    --mode auto|Color|Gray|Lineart [Color]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --source Flatbed [Flatbed]
        Selects the scan source (such as a document-feeder). Set source before
        mode and resolution. Resets mode and resolution to auto values.
    --button-controlled[=(yes|no)] [no]
        When enabled, scan process will not start immediately. To proceed,
        press "SCAN" button (for MP150) or "COLOR" button (for other models).
        To cancel, press "GRAY" button.
  Gamma:
    --custom-gamma[=(auto|yes|no)] [yes]
        Determines whether a builtin or a custom gamma-table should be used.
    --gamma-table auto|0..255,...
        Gamma-correction table.  In color mode this option equally affects the
        red, green, and blue channels simultaneously (i.e., it is an intensity
        gamma table).
    --gamma auto|0.299988..5 [2.2]
        Changes intensity of midtones
  Geometry:
    -l auto|0..216.069mm [0]
        Top-left x position of scan area.
    -t auto|0..297.011mm [0]
        Top-left y position of scan area.
    -x auto|0..216.069mm [216.069]
        Width of scan-area.
    -y auto|0..297.011mm [297.011]
        Height of scan-area.
  Buttons:
    --button-update
        Update button state
  Extras:
    --threshold auto|0..100% (in steps of 1) [inactive]
        Select minimum-brightness to get a white point
    --threshold-curve auto|0..127 (in steps of 1) [inactive]
        Dynamic threshold curve, from light to dark, normally 50-65

Remarks privat:
Lineart works with --threshold  and  --threshold-curve,  Color and Gray not. Error

--gamma 1.0 is the best for all.  Without you lose datas from orgin Paper.

JFotokopie (zuletzt geändert am 2015-06-27 12:53:17 durch 178-82-198-142)