473,385 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Printing of any type of file

Heya All,

Recently, I've implemented a simple document storage application. To cut a
long story short, it achieves this by:

1) User opens a file
2) File is read in and stored in another location my application (on a
server)
3) Icon appears in the application for the file
4) When the user wants to view the file, they double click the icon and the
file is transferred to the temporary folder and Process.Start is used to
launch the file so whatever viewer application is registered for the file is
launched (e.g. Word, Acrobat, Notepad etc.).

This part works fine, but does anybody have any ideas on how to print the
file from the application? Considering my application doesn't know the
structure of the files (it relies on whatever viewer application is
installed to do this), I'll need some common way of telling to viewer
application to print the file, instead of opening it.

My idea would be to somehow invoke the "Print" command that appears when you
right click on a file in explorer (which obviously requires the viewer
application to register the "Print" action for that file type when it is
installed).

Is there any way of doing this? I realise that not all file types can be
printed, but If I could get a way of seeing if "Print" is a registered
action for that file type and invoking it, it would do the job.

Many thanks for your suggestions and help,

Trev.

Jul 21 '05 #1
1 1416

Aha,

After a bit of looking I came accross the "ProcessStartInfo.Verb" property
which can be used for this purpose when launching the file.

I'll Use "ProcessStartInfo.Verbs" to see if "Print" is one of them, then
call Process.Start to launch the file with the "Print" verb.
Best Regards,

Trev.
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jody Gelowitz | last post by:
I am having a problem with printing selected pages. Actually, the problem isn't with printing selected pages as it is more to do with having blank pages print for those pages that have not been...
10
by: Brian Hanson | last post by:
Hi, I am trying to programmatically print a pdf file via an asp.net application. I have seen other postings that mention the following code used or something similar to it in a vb.net app. ...
9
by: Jody Gelowitz | last post by:
I am trying to find the definition of "Safe Printing" and cannot find out exactly what this entitles. The reason is that I am trying to print contents from a single textbox to no avail using the...
8
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.