|
|
system.drawing.printing question |
|
Author |
Message |
JustinParkes

|
Posted: .NET Base Class Library, system.drawing.printing question |
Top |
Hi there everyone....
I have done tons of reading in this forum and others about the best way
to print documents (word and pdf) and have mixed reviews. If anyone can
answer my question I will be eternally grateful... here goes...
in .Net's PrintDocument class, how do I print a word document using
this class I have read that you need to open a streamreader
(and presumably read the doc) then handle the pageevent arg, but if I
open a streamreader for the word file, will it lose the
formatting
I know I can use interop to do this printing, but all documentation I
have read indicates I shouldn't do this, and besides I don't get the
printer control I need when doing this.
any ideas or suggesstions will be helpful..
Thanks
Justin
.NET Development8
|
|
|
|
 |
nobugz

|
Posted: .NET Base Class Library, system.drawing.printing question |
Top |
You can't make this work. The Word .doc file format is not documented, properly formatting its many styles, tables, and OLE objects would be a major undertaking. Just ask Word to do the printing for you with Automation. Repost your question in the VSTO forum if you want to find out how to use the Microsoft.Office.Interop.Word namespace.
|
|
|
|
 |
JustinParkes

|
Posted: .NET Base Class Library, system.drawing.printing question |
Top |
Many thanks for
your response. I have surcumbed and used the word automation
which works fine. One more question for you, do you know a way of
setting printing settings while printing docs in automation
I need to be able to say print in Grey scale or colour depending on a few paramaters
|
|
|
|
 |
|
|