[Gambas-user] Gb.Report2 (and printing .pdf)
Fabien Bodard
gambas.fr at ...626...
Mon Apr 6 19:48:07 CEST 2015
2015-04-06 10:52 GMT+02:00 Frank <fgores at ...174...>:
> With repect to printing in Gambas, I have the following (unfinished) code
>
> a FMain with two buttons, Btprint which prints the report hReport1 as it should, and a button Brprintpdf which should print the same hReport to file as .pdf. I know there is code to print to .pdf missing as it saves a blank pdf, but as a newbee I have no clue what is missing
> I suspect it must be something with draw and a event with a printer component on hReport1, right?
>
> Public Sub _new()
>
> End
>
> Public Sub Form_Open()
> Me.Center
> End
>
> Public Sub Btprint_Click()
>
> Dim hReport1 As New Reuse thatport1
>
> hreport1 = New Report1
> hreport1.paper = Printer.A4
> hreport1.Orientation = Printer.Landscape
> hreport1.Print
>
> End
>
>
> Public Sub Btprintpdf_Click()
>
Dim hprinter As New Printer
>
'hprinter.Configure don't use that !
hprinter.Orientation = Printer.Landscape
hprinter.Resolution = Desktop.Resolution
hprinter.Paper = Printer.A4
hprinter.OutputFile = "/home/frank/test999.pdf"
hReport1.Print(hprinter)
But for all of that ou can use directly
hReport1.Preview...
And please use a new thread next time
> End With
> End
>
More information about the User
mailing list