ciao raga
ennesimo problema, con il seguente comando mando una stampa direttamente alla stampante, solo che mentre il report è fatto in verticale, la stampante stampa in orizzontale.
hStampa = SHELL ("lpr " & M1.MyReport) WAIT
come faccio ad impostare shell per la stampa verticale?
Prova con:
SHELL "a2ps -o lpr -Plj0 " & M1.MyReport
WAIT
Spero che M1.MyReport sia un file di testo
M1.MyReport è una variabile contenente il percorso e un file pdf.
questo è il contenuto della variabile
"/home/aft/.VisualGold/temp/report.pdf"
SHELL "pdftops " & M1.MyReport & " filename.ps"
SHELL "lpr -Plj0 filename.ps"
nada, ne ho provati vari ma a parte il primo che mi stampa orizzontale nessun altro avvia la stampa
hStampa = SHELL ("lpr " & M1.MyReport) WAIT 'l'unico che funziona
'hStampa = SHELL ("a2ps -o lpr " & M1.MyReport) WAIT
'hStampa = SHELL ("lpr -Plj0 " & M1.MyReport) WAIT
'hStampa = SHELL ("pdftops " & M1.MyReport) WAIT
'hStampa = SHELL "lpr -Plj0 filename.ps"
'SHELL "lpr -Plj0 " & M1.MyReport
milio ha scritto:
Forse questo ti puo' aiutare
www.cups.org/documentation.php/options.html
raga risolto grazie a milio con questo codice:
hStampa = SHELL ("lpr -o orientation-requested=4 " & M1.MyReport) WAIT
per la cronaca anche il suggerimento di fsurfing funzionava con
SHELL ("pdftk " & M1.MyReport & " cat 1E 2 - END OUTPUT /home/aft/.VisualGold/temp/reportg.pdf")
l'unico inconveniente era che dovevo rinominare il file diversamente e poi stamparlo
Golia ha scritto:
E per cambiare la stampante? Cè un sistema senza usare le qt?
si può fare, è scritto nei primi capitoli di
http://www.cups.org/documentation.php/options.html (http://www.cups.org/documentation.php/options.html)
Choosing a Printer
Many systems will have more than one printer available to the user.
These printers can be attached to the local system via a parallel, serial,
or USB port, or available over the network.
Use the lpstat(1) command to see a list of available printers:
lpstat -p -d
The -p option specifies that you want to see a list of printers, and the -d
option reports the current default printer or class.
Use the -d option with the lp command to print to a specific printer:
lp -d printer filename
or the -P option with the lpr command:
lpr -P printer filename
Setting the Default Printer
If you normally use a particular printer, you can tell CUPS to use it by default using the lpoptions(1) command:
lpoptions -d printer