Solved

Print from template with placeholders

Posted on 2010-11-23
2
1,132 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now