Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Print from template with placeholders

Posted on 2010-11-23
2
Medium Priority
?
1,139 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 150 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

604 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