-
July 11th, 2013, 01:44 AM
#1
Printing a document
I have to develop an application that will print the document and based on the result whether the printing was a success or a failure should display the status.
Some of the important futures are
1) It will print multiple documents, the file and its location will be provided from a table in SQL Server.
2) The files will be printed sequentially.
3) The application will update the status of the document within the SQL Server database whether it was a success or failure.
4) It should take the default drivers and print it
How can I accompalish this? There might be numerous C# examples on internet available where you can print the document. But how can i get the status of that document whether it was a success or failure. Irrespective of whatever reason it failed to print?
Thanks in Advance
-
July 11th, 2013, 06:51 PM
#2
Re: Printing a document
Originally Posted by maverick786us
How can I accompalish this? There might be numerous C# examples on internet available where you can print the document. But how can i get the status of that document whether it was a success or failure. Irrespective of whatever reason it failed to print?
Thanks in Advance
Depending on how you are printing the document, you either need to check the return value from the print method and/or catch exceptions.
-
July 15th, 2013, 04:32 AM
#3
Re: Printing a document
Originally Posted by Arjay
Depending on how you are printing the document, you either need to check the return value from the print method and/or catch exceptions.
Which print method is generally used that has a return value
-
July 15th, 2013, 12:47 PM
#4
Re: Printing a document
Originally Posted by maverick786us
Which print method is generally used that has a return value
There are several ways to print, which way are you printing?
-
July 18th, 2013, 03:20 AM
#5
Re: Printing a document
A method in which you simply provides the path of the file and it prints that particular file
-
July 18th, 2013, 02:21 PM
#6
Re: Printing a document
Originally Posted by maverick786us
A method in which you simply provides the path of the file and it prints that particular file
Without knowing exactly what you are doing, it's going to be hard to help, so good luck to you.
-
July 22nd, 2013, 01:54 AM
#7
Re: Printing a document
I have a database which consist of a list of print documents, along with its path. Now my application will print those documents from the path specified and within that table will display the status, whether its a success or failure. In case if it was a failuer, it show display the reason why it failed. Hope this information is sufficient?
-
July 22nd, 2013, 11:27 AM
#8
Re: Printing a document
Originally Posted by maverick786us
I have a database which consist of a list of print documents, along with its path. Now my application will print those documents from the path specified and within that table will display the status, whether its a success or failure. In case if it was a failuer, it show display the reason why it failed. Hope this information is sufficient?
It isn't. Show some code.
Look, the concept here is simple - check return codes and exceptions for errors. If the approach you are using doesn't return error codes or throw exceptions, use another approach.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|