Jump to content
Xtreme .Net Talk

Recommended Posts

Guest Cheung
Posted

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 didn't work either.

 

Thank you very much.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...