2015-04-06 10:52 GMT+02:00 Frank <fgo...@bluewin.ch>: > 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 > ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user