[Gambas-user] Sending direct to printer
Ron Onstenk
ronstk at ...239...
Tue Aug 12 09:44:21 CEST 2008
On Tuesday 12 August 2008, charlesg wrote:
>
> SHELL "htmldoc --bodyfont Sans --outfile /home/c/Documents/tfc.pdf --webpage
> /home/c/Documents/tfc.htm" WAIT
> SHELL "lpr /home/c/Documents/tfc.pdf" WAIT
>
> rgds
When I do understand it right Richard does not want the dialog for the printer.
The method I did use for printing is/was like next code.
function printform_click()
dim lpgrab as picture 'ar image
dim lpimg as pcture ' or image
lpgrab = me.grab()
' or use the control on the form you want to print
' check help for result type of grab
lpimg = lpgrab.clip(top,left,width,height)
' or the correct method to getthe right part
file.save(tempraryfile,lpimg)
shell "lp " & temporaryfile" WAIT
' check the right code howto do the shell
' and way the print program
end
The tip that counts is the .grab() method however this
is not idioat proof as I found at that time.
Point to be 100% sure to be is
1) NO other object on the screen may overlap the form/contol
2) the form/control part must be complete visible on screen.
3) if the .grab() is done and the form/control size results
in space outside the visible screen dimension the memory
is still used for the grab().
This result can show parts of previous visited webpage
(is happend to me) or other valuable information.
Ron
More information about the User
mailing list