Printing Several Files Of Different Formats Within Application?
Jun 21, 2010
We have a business application where users can upload documents and where admins later review them. These admins want to print these documents, preferably by just ticking checkboxes in the file list form and clicking a "print button".
My problem is how to append the different documents, which of course can be of different formats, and send them to a printer in one go. I am currently thinking of converting them into a common format (like xps of pdf, or even good old PostScript) and send that file out. I have not yet found any conversion tools though.
Has anyone had any experience in these matters, and if so, what were your conclusions? Are there any good conversion tools out there, or am I going in the wrong direction?
I want to have a web form where i browse any kind of video format file and convert it into the anyother video format using asp.net.Is it possible using asp.net? If yes then how can i do that and what builtin or third party components / controls has to use.
On Visual Studio's web server: dd/MM/yyyy en-US On IIS: M/d/yyyy en-US
Does "Regional and Language Options" in "Control Panel" play any role in this ? If I change the date format there in "Regional and Language Options", I see no effect in my application.
I have a web application with several MSChart and I need print all these chart but I dont know how. In some examples in the internet people using EditCopy() but it dont working for me because I cant found that method.
I'm working on a project for my companies intranet which requires that multiple attached documents to the main DTO of the project need to be autoprinted in the background. The problem is it's a web project and I want the printing to be done under the surface. Now because it's on an intranet only certain people can use it and I can set a communal printer in the background but I'm wondering hwo to actually print under the surface, the attachments could be anything from photocopy gifs/jpegs to pdf/word docs. Should I use the PrintDocument class? Not really sure how to implement this one.
We have an ASP.NET 3.5 Web application in which we have faced the below issue:
The application is working fine but suddently at one point application URL prompts for the authentication. When we (the support team) checked the server, we were able to identify that the access was denied for some of the main files (like web.config, default page). When we enabled the access the application started working fine.
I'm developing an application in which user can decide if he wants to print something now or at some other time. So the idea is for user to click print and say now or determine the time when the document will be printed (without any further user inputs). I don't know what is the best way in asp.net mvc to this. Is there any way to print html in this way or do i have to convert that html in some other format and save it in database?
I'm starting to learn ASP.NET and going through the tutorial videos on www.asp.net. I understand the basic concept of web application frame works like ASP/PHP/ASP.NET. HTML/XHTML is created with special tags that the server knows to read and replace with content. I did a little bit with ASP during a summer internship back in the 90's.
Yet with the few examples of ASP.NET I've seen so far it seems ASP.NET has two types of server interpreted tags.
but I also see regular ASP tags like <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="TailspinSpyWorks.SiteMaster" %>
What is the difference between these two tag formats? Both are interpreted by the server correct? Why would I use one over the other?
I created a page that allows our customers to print their ads that they have listed with us. All of their image information is stored in our DB as a url since we run on multiple servers. In order to get the image on the page, I download it as a temporary file and than draw it on the page.
Code:
Dim Images As Generic.List(Of VehicleImages) = vInfo.VehicleImages Dim picture As String = "" If Images.Count > 0 Then picture = Images(0).ImageURL End If If picture <> "" Then Dim pic As String = picture.Replace(Session("imageDomain"), Session("imageShareName")).Replace("/", "") writeToLog("Picture Location: " & pic) *Add to catch possible error, not part of the issue* Dim img As System.Drawing.Image = System.Drawing.Image.FromFile(pic) Dim temppic As String = "*save path* emp_" & Date.Now.Ticks & ".jpeg" img.Save(temppic) System.IO.File.WriteAllText("D: emppdftester.txt", picture) Dim imgNum As Int32 = pdf.AddImageFromFile(temppic, 0) If imgNum = 0 Then pdf.DrawText(LeftEdge, curY, "Couldn't load image") curY += space + pdf.GetTextSize Else pdf.SelectImage(imgNum) pdf.FitImage(LeftEdge, 180, 540, 260, 0, 0, 0) curY += 200 End If If System.IO.File.Exists(temppic) Then System.IO.File.Delete(temppic) End If End If
The issue is that for one of our customers (not sure if there is more as noone has said anything), it errors on the bold line and the error is:
Quote:
Exception information: Exception type: ArgumentException Exception message: URI formats are not supported. at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength) at System.IO.Path.GetFullPath(String path) at System.Drawing.IntSecurity.UnsafeGetFullPath(String fileName) at System.Drawing.IntSecurity.DemandReadFileIO(String fileName) at System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement) at Dealers_Only_PrintVehicleAd.createPDFSelectable() in *filename*:line 213 at Dealers_Only_PrintVehicleAd.btnPrintAds_Click(Object sender, EventArgs e) in *filename*:line 46 *Line that calls the Sub* at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I also tried it with NumberStyles.AllowCurrencySymbol with the same results. I verified that the value in amount.Text is "$28.28". Am I missing something? Shouldn't these two operations use the same currency symbol and formats?
I have a ListView with about 10 rows. I have an item template for these rows and it is working correctly. I want to have two more rows in this ListView, but these rows do not match the item template as they have one more control in the first column.
The layout of the ListView is based on an HTML table with 10 rows and 4 columns. For example, the first 8 rows have only an ASP.NET TextBox control in the first column and 2 rows have in an ASP.NET TextBox control and an ASP.NET Label control in the first column.
I have an MVC application which allows appointment booking. The user can click on a slot in the diary view, which takes them to a page to select the practitioner and confirm.The query string for this page contains a DateTime which is the time the appointment is to start. This is automatically formatted in US format by Html.ActionLink(...), like so:
/assign?date=04%2F06%2F2011%2009%3A00%3A00
This is correctly deserialised and the view reports that the appointment time will be the 6th of April. It is also stored in a hidden field in the view to be posted to the confirm action; the hidden field has the value: 04/06/2011 09:00:00, rendered by Html.HiddenFor(...). Again, looks like US format.However, when the form gets posted, the appointment is booked for the 4th of June, presumably interpreting the date as en-GB.
i recently installed IIS SEO toolkit on my Windows 7 desktop and tried to run a SEO report for my web site [URL], based on a multi-lingual (greek, english) implementation of asp.net mvc 1. One of the violations reported, has to do with the fact that in my global.asax file, i have the default values "el-GR", "Home" and "Index" for the locale code, controller and action route parameters correspondingly. This way, the [URL] and the [URL] are reported to be acceced from the same url from the SEO toolkit, like shown below:
The page with URL [URL] can also be accessed by using URL [URL].
I was trying to use code at this link... [URL] ....
I was able to successfully get the Excel export function working but there are issues with the CSV I am still troubleshooting.
My issue is this though. I have a Gridview of both English and other foreign languages such as Japanese and Thai. The foreign Asian languages do not export properly using your code. European languages such as Spanish, French and Italian have no problem. Do you have a fix to support the Asian languages?
If culture is en-GB then string dateFormat="dd/mmyyyy"; string timeFormat="24.00 hrs";
and so on for other countries..Now how do I get these date and time format values ? What are the standards? Like which all countries use similar date/time formats and which ones don't ?ok I tried this :- DateTime myDate = new DateTime(); string us = myDate.ToString(new CultureInfo("en-US"));
string us gets value =1/1/0001 12:00:00 AM
Now how do I extract "dd/mm/yyyy" and "24.00 hrs" out of this...in my Dateformat column in my Table... I want to store STRINGS such as dd/mm/yyyy or mm/dd/yyyy NOT dates..In my TimeFormat column in the table, the values to be stores are STRINGS too, like I need to store either "24:00hrs" or "12:00hrs"
How do I do this now ?**using ShorTimePattern returns these values as h:mm tt and HH:mm
If I want to store the values in my DB exactly as "24:00hrs" and "12:00hrs", how do I use these values..h:mm tt and HH:mm,which one is for 24 hr format and which for 12 hr format ?**I want the information about Decimal Separator and Thousand Separator too based on the CultureInfo...whats the property for that ?
I have some WCF services that I want to return in different formats based on a querystring param. For example, [URL], [URL], [URL], etc... This would make it so that many different types of clients could consume the services whichever way was easiest for them, such as binary for a .NET client and json for an ajax or Flex client.
What I'm thinking is that I can have the WCF web methods return their .NET business objects and not worry about the output mode and then have a behavior that hooks in after returning from the web method which checks the querystring for this param and either:
1. Continues returning the business objects if the mode is dotnet.
2. Converts the business objects to xml if the mode is xml and returns a string of xml.
3. Converts the business objects to json if the mode is json and returns a string of json.