Another question on printing

  • Thread starter Thread starter Cheung
  • Start date Start date
C

Cheung

Guest
I want to print A5 size document in a dot matirx printer. The paper used is those kind of continuous paper which I need to tear off for each document. I set the paper size property as the following:

Public Function PreviewDebitNote( ....... ) As Boolean
..........
myPrintDocu = New PrintDocument()
myPreviewDocu = New PrintPreviewDialog()
Try
AddHandler myPrintDocu.PrintPage, AddressOf PrintText
myPrintDocu.DefaultPageSettings = printPageSettings
myPrintDocu.DefaultPageSettings.PaperSize = New PaperSize("Customer Paper Size", 930, 583)
myPreviewDocu.Document = myPrintDocu
myPreviewDocu.ShowDialog()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Function

Everytime it printed out a document, the printer will automatically scroll as if it is a A4 paper. I also tried setting the properties of the printer in windows. It didnt work either.

Thank you very much.
 
Back
Top