Web Forms :: Plugin To Print Document At Client Machine?
Jan 27, 2010
I am developing a Web Application using ASP.NET(C#.NET). One of the critical requirements of it is Print Word/Pdf Documents on Client Side i.e.., Print to printer connected to a Client Machine. I have searched a lot for this and i didn't got it solved..
Now i got a thought of developing a windows application associated with web App. And i want to create a plugin for winApp in WebApp. Is it possible, if yes then how to develop a plugin using .NET for Web Application.
Now I am printing the data from model in mvc. I am also printing the documents, How I upload file how to print that particular documents which is related that particular user with the other data...
I have a Requirement Where I need to Generate the PDf Docuemnts and I need to Send it to the Printer.
All the Pdf Documents are dynamically generated and it will be saved in server Temporary Folder.Then all these PDF Document has to be sent to the Clients Network Printer.
I have googled and searched the forums for an answer to this but nothing seems to fit.
I have installed the SP1 release of SQL 2008 Report Viewer Distributable and the SP1 of 2005 as well. My report viewer control is pointing at version 9.0.0.0 in the page references and web.config.
The problem is when clicking on the print icon i get the ActiveX control install prompt, click install it disappears briefly and I then get the "Unable to load client print control error". This is happening on my development machine.
Under the C:WINDOWSDownloaded Program Files folder i have a control with the name {0D221D00-A6ED-477C-8A91-41F3B660A832} I have tried removing this and allowing the ActiveX to install again, but this has made no difference.
I have the "Unable to load print control" on two live web servers so want the control working on my development machine before i tackle the issue on the servers.
I have to have a web form that allows the user to print a PDF Document from a web form or web service. The requirements are that the user will not see the pdf before printing, the call to print will actually happen on the Web Server it's self, the web server does not have adobe, and the document has to print to a Network printer that the web server is not setup to print to.
When calling Response.Cookie.Add(new HttpCookie("MyCookie", "objValue")); where does the cookie saved? on Client Machine or Server Machine?
EDIT:if saved in Client Machine, how can I read it from javascript then? I tried this kind of script.
function getCookie(c_name) { var i, x, y, ARRcookies = document.cookie.split(";"); for (i = 0; i < ARRcookies.length; i++) { [code].....
I cannot get the cookie that I saved from code behind. When I look into the document.cookie object, it is just an empty string.
Scenario:On Page_Init() on code behind. I create a cookie using Response.Cookie.Add(new HttpCookie("MyCookie", "cookieValue"));. On Client side, I'm trying to read the cookie saved from code behind on page load using the snippet above, but it returns undefined
I want to be able to automatically print a document to a selected printer at a given time, i.e. printer 1 @ 10:00, Printer 2 @ 10:15, this is to be unatended once the setting have been made.
iam using the ReportViewer Control in Visual Studio 2008 for displaying the report on the page. When iam going to Click on Print button iam getting the below error. Unable to load client print control
I want to print the document in the ASP.NET without opening the document, i know the path and file name, Is there any option available in ASP.NET as in windows application
I wrote an web form application in C# to open Office Word 2007 documents from the application. This worked perfectly testing in my development environment. But after deploying my application to web server, the documents do not open and I get the following error retrieving the com class factory for component with clsid failed due to the following error: 80040154
It looks like it may be because Office Word 2007 is not installed on the web server box. Would installing it on the web server be the solution, or is this a bad idea. If it is not the solution, then would is an alternative way to do this.
how can i access client machine's specific file contained in a drive or folder.Suppose in Server side i have knowledge of full path of a file that is present in client side, like "D:ABCFolderxyzFile.doc", this is a file that i want to retrieve and store in server side .
We have a requirement to allow the cient to upload multiple files which resides in a single folder, within the client computer. To do this can we allow the client to browse for the file location and select a single file (via a normal asp file uploader), and then recursively read the necessary files from the relevant directory? Is this possible or is there any other way to do this?
I have developed an application where I need to create a page to read data from Excel File and then update it to the database. The code that I wrote works only when the application runs from my machine. When I deployed the application to the server it gave an error- 'C:PRFileIimport_File.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. here is mu code -
protected void InsertData(object sender, EventArgs e) { OleDbConnection oConn = new OleDbConnection (@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\PuertoRicoFile\Puertorico_Iimport_File.xls ; Extended Properties=Excel 8.0 "); OleDbCommand oCmd = new OleDbCommand("select * from [Puertorico_Data$]", oConn); oConn.Open(); //Here [Puertorico_Data$] is the name of the sheet in the Excel file where the data is present OleDbDataReader oleDbReader = oCmd.ExecuteReader(); string AgentIP = ""; string TagName = ""; string Status = ""; string Severity = ""; int EventCount = 0; string EarliestEvent = ""; string LatestEvent = ""; while (oleDbReader.Read()) { AgentIP = (string)oleDbReader[0]; // valid(oleDbReader, 0);//Here we are calling the valid method TagName = (string)oleDbReader[1]; //valid(oleDbReader, 1); Status = (string)oleDbReader[2]; //valid(oleDbReader, 2); Severity = (string)oleDbReader[3]; //valid(oleDbReader, 3); EventCount = Convert.ToInt32(oleDbReader[4]); //oleDbReader[0]; //valid(oleDbReader, 4); EarliestEvent = (string)oleDbReader[8]; //validate(oleDbReader, 8); EarliestEvent = EarliestEvent.Substring(0, 19); LatestEvent = (string)oleDbReader[9]; //validate(oleDbReader, 9); LatestEvent = EarliestEvent.Substring(0, 19); InsertDataIntoSql(AgentIP, TagName, Status, Severity, EventCount, EarliestEvent, LatestEvent); } SqlConnection mySQLconnection = new SqlConnection(ConfigurationManager.ConnectionStrings["IssNetworkReportingSystemConnString"].ConnectionString); mySQLconnection.Open(); SqlCommand cmdSql = new SqlCommand("AddMonth_Event_TotalInfo_for_Puertorico", mySQLconnection); cmdSql.CommandType = CommandType.StoredProcedure; dbReader = cmdSql.ExecuteReader(); dbReader.Close(); cmdSql = new SqlCommand("AddQtr_Event_TotalInfo_for_Puertorico", mySQLconnection); cmdSql.CommandType = CommandType.StoredProcedure; dbReader = cmdSql.ExecuteReader(); dbReader.Close(); oConn.Close(); lblMsg.Text = "Data Imported Sucessfully"; lblMsg.ForeColor = System.Drawing.Color.Green; } public void InsertDataIntoSql(string agentIP, string tagName, string Stat,string severity,int eventCount, string eEvent, string lEvent) {//inserting data into the Sql Server SqlConnection mySQLconnection = new SqlConnection(ConfigurationManager.ConnectionStrings["IssNetworkReportingSystemConnString"].ConnectionString); mySQLconnection.Open(); SqlCommand sqlSelect = new SqlCommand("SELECT SeverityID from Severity where SeverityDesc=@SeverityDesc",mySQLconnection); sqlSelect.CommandType = CommandType.Text; sqlSelect.Parameters.Add("@SeverityDesc", SqlDbType.NVarChar).Value = severity; dbReader = sqlSelect.ExecuteReader(); int severityId = Convert.ToInt32(dbReader.Read()); dbReader.Close(); SqlCommand sqlInsert = new SqlCommand("Insert into IdsData_Puertorico(AgentIP,TagName,Status,SeverityID,EventCount,EarliestEvent,LatestEvent)" + " values (@AgentIP,@TagName,@Status,@SeverityID,@EventCount,@EarliestEvent,@LatestEvent )" ,mySQLconnection); sqlInsert.CommandTimeout = 0; //timeout unlimited sqlInsert.CommandType = CommandType.Text; sqlInsert.Parameters.Add("@AgentIP", SqlDbType.NVarChar).Value = agentIP; sqlInsert.Parameters.Add("@TagName", SqlDbType.NVarChar).Value = tagName; sqlInsert.Parameters.Add("@Status", SqlDbType.NVarChar).Value = Stat; sqlInsert.Parameters.Add("@SeverityID", SqlDbType.Int).Value = Convert.ToInt32(severityId); sqlInsert.Parameters.Add("@EventCount", SqlDbType.Int).Value = Convert.ToInt32(eventCount); sqlInsert.Parameters.Add("@EarliestEvent", SqlDbType.DateTime).Value = DateTime.Parse(eEvent); sqlInsert.Parameters.Add("@LatestEvent", SqlDbType.DateTime).Value = DateTime.Parse(lEvent); sqlInsert.CommandType = CommandType.Text; sqlInsert.ExecuteNonQuery(); mySQLconnection.Close(); }
I have a web application which is supposed to create a file on clients local mcahine as the user is not having permissions to create a file on the server on which the web application is running.Can anyone please help me with this.I came across some posts stating that it is not a security measure to create a file on clients machine, but in my case I am left with no options.
I want to transfer a file from client machine to Web server. I need to allow the users to select a file on their machine and allow them to transfer the file to the web server? Also How does a file control work.
<INPUT id="File1" type="file" runat="server">
How to allow the users to transfer files to web servers from their local machine?
How to upload the file directly from the client machine. I have one button for mail sending.
If i click the button, the from, to, subject comes using pageload. Like that the default file also could be added as a attachment directly from the client machine.
How to upload the file directly(using file upload control or eithout using file upload control)...