Sub btnImage_Click
Printer1.Reset
Dim cs As CSBuilder
cs.Initialize.Size(7).Alignment("ALIGN_LEFT").Append("ΦΟΡΟΛΟΓΙΚΗ - ΑΠΟΔΕΙΞΗ ΕΝΑΡΞΗ" & CRLF).Pop
cs.Size(10).Alignment("ALIGN_CENTER").Append("ΦΟΡΟΛΟΓΙΚΗ - ΑΠΟΔΕΙΞΗ ΛΗΞΗ" & CRLF).Pop
cs.Size(10).Alignment("ALIGN_NORMAL").Append("ΦΟΡΟΛΟΓΙΚΗ - ΑΠΟΔΕΙΞΗ ΛΗΞΗ" & CRLF).Pop
cs.Size(10).Alignment("ALIGN_OPPOSITE").Append("ΦΟΡΟΛΟΓΙΚΗ - ΑΠΟΔΕΙΞΗ ΛΗΞΗ" & CRLF).Pop
cs.Size(10).Alignment("ALIGN_CENTER").Append("ΦΟΡΟΛΟΓΙΚΗ - ΑΠΟΔΕΙΞΗ ΛΗΞΗ" & CRLF).Pop
cs.Size(10).Append("ΤΕΣΤ αποδειξη"& CRLF).Pop
cs.Size(10).Append("ΕΙΔΟΣ ΤΕΣΤ"& CRLF).Pop
cs.Size(10).Append("ΤΕΜΑΧΙΟ 1"& CRLF)
cs.PopAll
lblGreek.Text = cs
Dim Out As OutputStream
Out = File.OpenOutput(File.DirInternal, "Test.png", False)
pnlGreek.Snapshot.WriteToStream(Out, 100, "PNG")
Out.Close
Dim bmp As Bitmap
If File.Exists(File.DirInternal,"Test.png") Then
bmp.Initialize(File.DirInternal,"Test.png")
Else
Return
End If
' Convert the RGB image to one with luminance values
Dim myimage As AnImage = Printer1.ImageToBWIMage(bmp)
' Choose thresholding the image or dithering it to get a black and white bit image
myimage = Printer1.ThresholdImage(myimage, 128)
' Send the black and white bit image to the printer
myimage= Printer1.PackImage(myimage)
Printer1.WriteString(CRLF) ' nudge the printer to show the user something is happening
Printer1.PrintImage(myimage)
Printer1.WriteString(CRLF & "Ended" & CRLF & CRLF)
End Sub