Quantcast
Channel: VBForums - WPF, WCF, WF
Viewing all articles
Browse latest Browse all 256

Is my understanding of printing correct?

$
0
0
I apologize in advance for my limited understanding of software programming.

If I have a WPF application that just displays files...like a viewer for .jpgs and .pdfs. and .tiffs and .html in a window and I want to print that file, then I can do something simple like this:

Code:

Dim printjob As New ProcessStartInfo()

        With printjob
            .Arguments = printer
            .FileName = My.Application.file
            .Verb = "Printto"
            .UseShellExecute = True
            .WindowStyle = ProcessWindowStyle.Hidden
        End With

        Process.Start(printjob)

But this only works because I have applications installed on the computer associated with the specific file type that do the heavy lifting right? Like if my application is displaying a .pdf file, then say Adobe Reader is actually printing my file correct?

If I want my application to be installed on a computer with no other applications installed and print the document that its currently viewing. Then I have alot of typing to do correct? Like defining fonts and margins and open a graphics handler and draw etc...

Its probably easier to convert all the files to a single file type like .pdf and go find some little pdf app like Sumatra and incorporate it into my project.

Just about every applications prints...how do you guys handle printing?

Viewing all articles
Browse latest Browse all 256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>