Solved

Print from template with placeholders

Posted on 2010-11-23
2
1,137 Views
Last Modified: 2012-05-10
We are currently printing some forms (e.g. invoices, delivery notes) by using HTML template with placeholders and the WebBrowser object for rendering and printing it with WebBrowser.print(). In order to send it to a certain printer we set the system default printer to the printer we need, print and set it back afterwards.
This creates issues, e.g. that we have no reliable feedback from the object whether the printing has finished, thus it is obviously a workaround we'd like to resolve different.

Is there a way to directly set the printer for the WebBrowser object?

Otherwise can you recommend a convenient way to print with the help of templates and placeholders, like e.g. HTML, Word formats, or anything else that does not need user interaction for printing and selecting the printer?


Its a c# .net 3.5 desktop application

Thanks, Paul
0
Comment
Question by:paulwehle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
chrios earned 50 total points
ID: 34203128
I don't believe you can set the printer that easily from the webbrowser object. Another drawback with using the webbrowser for printing is that it uses the same settings as internet explorer, such as the page header and footer.

The solution I used for my project was instead crystal reports. The downside with CR is that you will have to make sure that the client computer has the Crystal Reports Runtime Packages installed.

The code project has an article that may be interesting if you decide to try it: Choosing a printer when printing from Crystal Reports in C#
0
 

Author Closing Comment

by:paulwehle
ID: 34238737
It was the right suggestions which will do it for our windows application. Even the licensing works for us
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question