Printing a .dat file

B

baconbits420

i have created a .dat file using a streamwriter and am having troubles
recalling the file for printing to a receipt. I know to use a
printDialog and a PrintDocument, but how do i set the printDocument to
the document i want?

Any insight would help
 
H

Herfried K. Wagner [MVP]

i have created a .dat file using a streamwriter and am having troubles
recalling the file for printing to a receipt. I know to use a
printDialog and a PrintDocument, but how do i set the printDocument to
the document i want?

What data does the DAT file contain? You'll have to handle the print
document's 'PrintPage' event, draw the data to be printed onto the page
there ('e.Graphics.DrawString', 'e.HasMorePages') and start printing by
calling the print document's 'Print' method.
 
B

baconbits420

Thanks for the help. I was able to take what you said and find other
examples. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top