how to print .pdf and .doc files in vb.net

M

myrrh

hi! im currently doing a project in vb.net that could print 3 kinds of file
formats: .txt, .pdf, and .doc
i can already print text files but i haven't done pdf and .doc yet.
can anyone help me with this please? ur help would be greatly appreciated.
tnx!
 
R

rowe_newsgroups

hi! im currently doing a project in vb.net that could print 3 kinds of file
formats: .txt, .pdf, and .doc
i can already print text files but i haven't done pdf and .doc yet.
can anyone help me with this please? ur help would be greatly appreciated.
tnx!

You might want to search the group archives and see if you can find
what you need:

http://groups.google.com/group/micr...guages.vb&q=create+pdf&qt_g=Search+this+group
http://groups.google.com/group/micr...q=create+word+document&qt_g=Search+this+group

Another good place to search for examples is:

http://www.codeproject.com

If you're still stuck after reading some examples, please post back
with your specific problem and hopefully we'll be able to help you
out.

Thanks,

Seth Rowe [MVP]
 
M

myrrh via DotNetMonster.com

super thanks for the help!! :)

rowe_newsgroups said:
You might want to search the group archives and see if you can find
what you need:

http://groups.google.com/group/micr...guages.vb&q=create+pdf&qt_g=Search+this+group
http://groups.google.com/group/micr...q=create+word+document&qt_g=Search+this+group

Another good place to search for examples is:

http://www.codeproject.com

If you're still stuck after reading some examples, please post back
with your specific problem and hopefully we'll be able to help you
out.

Thanks,

Seth Rowe [MVP]
 
M

myrrh via DotNetMonster.com

question again :) i used the following codes to print .pdf and .doc files:

Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.Verb = "print"
psi.WindowStyle = ProcessWindowStyle.Hidden
psi.FileName = sReport
Process.Start(psi)

umm, is there a way to count the number of pages of the file being printed?
can you share some codes or links regaring this? tnx a lot..
 
H

Herfried K. Wagner [MVP]

myrrh via DotNetMonster.com said:
Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.Verb = "print"
psi.WindowStyle = ProcessWindowStyle.Hidden
psi.FileName = sReport
Process.Start(psi)

umm, is there a way to count the number of pages of the file being
printed?
can you share some codes or links regaring this?

Not directly, but you can use WMI (namespace 'System.Management', available
in "System.Management.dll") and the 'Win32_PrintJob' WMI class to determine
the number of pages of a certain print job. The 'Win32_PrintJob' class
provides a 'TotalPages' property. You can potentially identify the job by
monitoring the print queue and checking the jobs' 'Document' property.

Win32_PrintJob Class (Windows)
<URL:http://msdn2.microsoft.com/en-us/library/aa394370(VS.85).aspx>
 
M

myrrh via DotNetMonster.com

i'm honestly having a hard time with it. im just new to .net and i don't know
how to use it.. can
you give some sample codes or links regarding this? tnx! tnx!

myrrh via DotNetMonster.com said:
Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
[quoted text clipped - 6 lines]
printed?
can you share some codes or links regaring this?

Not directly, but you can use WMI (namespace 'System.Management', available
in "System.Management.dll") and the 'Win32_PrintJob' WMI class to determine
the number of pages of a certain print job. The 'Win32_PrintJob' class
provides a 'TotalPages' property. You can potentially identify the job by
monitoring the print queue and checking the jobs' 'Document' property.

Win32_PrintJob Class (Windows)
<URL:http://msdn2.microsoft.com/en-us/library/aa394370(VS.85).aspx>
 

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