[Gambas-user] R: Can't print in Gambas 3

Johny Provoost johny.provoost at ...27...
Wed May 16 22:59:08 CEST 2012


Still empty page (or empty pdf).
If I run the program line by line it seems not going to the sub 
mijnprinter_Draw.  After the 'mijnprinter.Print' it prints an empty page 
and ends.
It was much simpler in Gambas2.  It's the only thing (the printing part) 
that's not working after porting my program to Gambas3, so I tried with 
a simple button on a window.  I don't find much in the help files.

Op 16-05-12 22:34, Ru Vuott schreef:
>> Error is gone, but still got a empty
>> page.
> Uhmm.... strange....
>
> Try:
>
> Public Sub Button1_Click()
>        If mijnprinter.Configure() = True Then Return
>        mijnprinter.FirstPage = 0
>        mijnprinter.Orientation = 1
>        mijnprinter.Paper = 2
>        mijnprinter.Print
> End
>
> Public Sub mijnprinter_Draw()
>
>      With Paint
>        .DrawText("Imprimatur", 500, 1000, 400, 500)
>        .RichText(String.Chr(&1D11E), 600, 2000, 200, 200)
>        .Fill
>        .End
>      End With
>
> End
>
> ''''''
> If you want to create a PDF file:
>
> Public Sub Button1_Click()
>        If mijnprinter.Configure() = True Then Return
>        mijnprinter.FirstPage = 0
>        mijnprinter.Orientation = 1
>        mijnprinter.Paper = 2
>        mijnprinter.OutputFile = "/tmp/imprimatur.pdf"
>        mijnprinter.Print
> End
>
> Public Sub mijnprinter_Draw()
>
>      With Paint
>        .DrawText("Imprimatur", 500, 1000, 400, 500)
>        .RichText(String.Chr(&1D11E), 600, 2000, 200, 200)
>        .Fill
>        .End
>      End With
>
> End
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

-- 



*Vriendelijke Groeten*

*Johny Provoost*

*mailto: johny.provoost at ...27... <mailto:johny.provoost at ...27...>*

*mailto: johny.provoost at ...626... <mailto:johny.provoost at ...626...>*

*Website:* *http://www.johnyprovoost.net* <http://www.johnyprovoost.net/>






More information about the User mailing list