Print Text Maintaining Tab Stops

  • Thread starter Thread starter Ed Bitzer
  • Start date Start date
E

Ed Bitzer

I can locate tab stops in a RichTextBox but have not found a way to
maintain that positioning when I print. At the Knowledge Discovery
Keys Site (http://www.kdkeys.net/forums/3122/ShowPost.aspx) Baily
explains that character printing isn't really supported in VB .Net,
the TAB method does not apply. The DrawString method is used to send
strings to the printer. He notes a workaround is to write out the
content to a file (where the TAB method is sill supported) in the same
fashion as it would have been sent to the printer, and then stream
this to the printer.



I have tried this using his code attempting to take a simple text file
with some tabs, read it into a stream and then print - but the tabs
are gone. Appreciate a pointer to any code that might accomplish.



Ed
 
Hi,

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/wnf_RichTextBox.asp

Ken
-------------------
I can locate tab stops in a RichTextBox but have not found a way to
maintain that positioning when I print. At the Knowledge Discovery
Keys Site (http://www.kdkeys.net/forums/3122/ShowPost.aspx) Baily
explains that character printing isn't really supported in VB .Net,
the TAB method does not apply. The DrawString method is used to send
strings to the printer. He notes a workaround is to write out the
content to a file (where the TAB method is sill supported) in the same
fashion as it would have been sent to the printer, and then stream
this to the printer.



I have tried this using his code attempting to take a simple text file
with some tabs, read it into a stream and then print - but the tabs
are gone. Appreciate a pointer to any code that might accomplish.



Ed
 
Ken,

Heavy.... looks like the answer but wonder if this old retired guy and
learn some new tricks. Thanks - I'll start studying

Ed
 

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

Back
Top