Click here to Skip to main content
14,454,243 members
Rate this:
Please Sign up or sign in to vote.
See more:
hi.
I want to develop a printing component using asp.net with c#.
This component fetch printers connected in the network and select the printer and send a txt/word/pdf file to print.


pls send a code for how to print print pdf file with out using any acrobat libraries.


pls send the code its urgent.
Posted
Updated 26-Jul-10 9:12am
v2
Comments
E.F. Nijboer 26-Jul-10 12:07pm
   
did you try any effort yourself?
Pickettt 17-Mar-17 5:04am
   
Very short solution to this:

string filePath = "Sample.docx";
DocumentModel document = DocumentModel.Load(filePath);

string printerName = "Sample";
document.Print(printerName);

The complete sample is shown in this example for printing word, pdf, etc. files in C#. The sample is a WPF application, but you can use the same approach for ASP.NET, also it does not use acrobat library but instead uses this .NET library for Word.
Rate this:
Please Sign up or sign in to vote.

Solution 1

As it's urgent, the code you require is:

CTRL-P

   
Comments
Toli Cuturicu 26-Jul-10 16:03pm
   
Reason for my vote of 5
Very nice!
Rate this:
Please Sign up or sign in to vote.

Solution 2

Here is what is expected by enquirers:
1. TRY first what you want to do!
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100