I'm using iTextSharp to print a PDF document. Everything goes ok until I have to print the company logo in it.
First I noticed that the logo had poor quality, but after testing with several images, I realize that was the iTextSharp rendering it poorly.The test I did to say this was to print the PDF using my code and then edit the document with Acrobat 8.0 and I drew an image. Then printed the two documents and saw the noticeable difference.My question is that if anyone know if this can be due to a scaling problem where I'm failing to tell iTextSharp how it must render the image or is an iTextSharp limitation.
The code to render the image is the following:
[Code]....
The method ResizeImage() do the resizing of the width and height respecting the aspect ratio and keeping in a max width and a max height limits.
I have been asked to join a very small team where one main developer has been buiding the web app (.NET 4.0) during ~6 months. The project should be delivered within next 2 months.
After first look at the code I can say that I would never allow it to go to production (things like catch { }, no tests at all with WebForms etc).
So the code quality is incredibly low.
My task is to improve that and still deliver the solution. So I plan to start with unit testing and MVC2 reimplementing most of the functionality (though using some of the existing code).
I estimate that I will need about 6 weeks to catch up with the current progress and be on te same functionality level as the application will be in 6 weeks.
The problem is that the main developer who has been working on the project seems to be really starting in IT and many basic things are unknown to him. It will take significant amount of time and effort to educate him how to do the proper testing, development and apply some patterns.
I am ready to take responsibility for the reimplemnting the application but at the same time I don't want the main developer to be on idle but as he won't be able to significantly contribute to the better-world project at this stage I am not sure what would the best way to keep productivity high for both of us.
Currently I think following solution is good enough: He proceeds doing what he does until I will catch up with him and then start working on a new project together.
The problem is that of course this approach is not very productive as one developer will do better-world project while the other will proceed with what he did, effectively doing similar tasks.
Another approach would be to pair and try to do things together, but again not sure how productive we will be.
Can you suggest how we could better organise the work together in order to be most efficient for the overall project?
I am developing an ASP.NET 3.5 web application in which I am allowing my users to upload either jpeg,gif,bmp or png images. If the uploaded image dimensions are greater then 103 x 32 the I want to resize the uploaded image to 103 x 32. I have read some blog posts and articles, and have also tried some of the code samples but nothing seems to work right.
I have a script which resizes images, I did not write this script, nor do I know any ASP.NET, but I have been assigned the task of fixing an issue with it!
The problem is, the resulting image from the resize appears to be of less quality than the upload, even if the file uploaded is already set to the correct size.
Uploaded image - [URL] Resized image - [URL]
The script that is doing the resizing is as follows, how to correct the issue?
I am looking c# code which creates better quality higher resolution thumbnail image. i am having an image of dimension(600 * 900) and i need to create thumbnail of dimension (100 * 100) with high quality.
I have uploaded a .jpg image and resized as Small and Large thumbnail. The small image is (135 X 173) but after resizing the small thumbnail image file size is of 40.8 KB. And mostly all images (around 64) thumbnails having file size more than 40 KB. Due to which thumbnails taking lot of time to get display.
Is there a way through which we can reduce the image file size upto 8 to 12 kb, but without effecting image quaity??
Below is the source code that i am using for resizing an image:
If FileUpload1.HasFile Then Dim stream As Stream = FileUpload1.PostedFile.InputStream Dim x As String = IO.Path.GetExtension(FileUpload1.FileName).ToLower If x = ".jpg" Or x = ".jpeg" Then Dim image As New Bitmap(stream)
I am using iTextSharp to export my webpage to pdf. I have added my logo to the webpage. But I want to add it to header so that it will repeat on all the pages at the top.
I need to be able to export PDF's that I am creating to JPEG, so that users can have a screenshot/thumbnail of the end product, which is faster than opening the whole PDF.
I am running this on an ASP.NET website running in Medium Trust in the Rackspace Mosso Cloud.
I have yet to find a library that will either work in Medium trust, or in the case of ABC PDF, which works great locally, wont load in Mosso. Maybe Mosso has a custom trust level?
I know that iTextSharp works on Mosso, but I haven't been able to figure how to "screenshot" a single page of a PDF, or export a page to JPEG.
How to add watermark to uploaded doc (pdf or image files).The workflow will be-User register at portal -> user upload some required document (like financial proof or some kind) -> When saving them to database -> a watermark (predefined by admin at backend in admin panel as - Logo or Text) will be added to those uploaded document on top and bottom or wherever possible on the uploaded document.
So in future when admin views the document uploaded by him in his account, it will be displayed with stamp or the watermark. It will prove that the document is uploaded to server by user or whatever. Now, this we have found way to do in jpg, but in case of pdf its quite tough..
I have developed a application using Visual Studio 2008 and SQLServer 2008. I have a page called "Billing Center" where i need to display more than 500 records in a gridview and the gridview has sorting enabled. If i limit the page size upto 10 only the gridview performs well but user requirement is to view atleast 500 records at once which is slowing down the gridview record retrieval process.
I am using the following C# code in code behind to sorting, paging and retrieval . Please guide me what am i doing wrong in this code and how to make it work with large data set.
I am using Reporting Services to render a report directly to PDF. It requires that I use two web references: ReportExecution2005.asmx and ReportService2005.asmx. The performance on web references seems really poor. Since my web server (IIS7) and my SQL Server (2008) are on the same box, is there a way I can reference them directly? If not is there any way I can explicitly cache them or something. First load is really really slow, second load is perfectly acceptable.
I have a page that, jQuery will automatically click the "Run Report" button under certain conditions. So, when the user goes to the page via the menu, they wait for x seconds and the results are returned. This works great...However, I want to add an animation because some users are not aware anything is going on and I also would like to just show a spinner. The application is not yet "Ajaxified" and may never be. So I thought of a poor-mans way of doing it.I have a div that has text and an image in it. That div has a class on that that simply does display: none; The same jQuery that clicks the button I also have it using the .toggleClass method to now Show the div.
This works great AND the report runs and eventually returns the data and since at that point the page is refreshed, the div gets hidden again and all is right in the world.My problem is, the image shows but does not animate. I tried to put it Before the click hoping that would happen and start its thing Then the click even to start the waiting would occur.Is there anything I can do to force the Gif to animate?
I am using asyncfileupload ajax control and can successfully upload and save picture on server.I need to do the following and not sure how:When user is in process of uploading, I only want them to see *.jpg *.gif and *.bmp files Once the user uploads their picture, how do I reduce the quality of the picture so it is less than 10 KB?
In the Java world for instance, there are some very sophisticated tools to manage the quality of the source code, and that cover more than one dimension, such as :
Coding Rules Comments Complexity Unit testing Code coverage etc.
These tools are very useful to manage the technical debt. They connect to a repository of source code and scan it. They can be triggered automatically just by the fact of committing the source code.We have a large number of ASP.NET applications to maintain and evolve, and have continuous flow of demands for new ones to be created. We know that we have a technical debt, but we are facing some challenges of identifying it and having it under control.
there are some tools to manage the source code quality in ASP.NET applications like those mentioned above.
In our project We made reports with the method that return as a datatable from a class with dynamic sql.
Nowadays, we think to migrate to more professional technic for our reports. For this purpose I examine crystal report and devexpress' XtraReport components.
However, I Couldn't decide which component and method(dynamic sql, stored procedure etc.) should I use.
how to get the best software to use for the following?
(i) Web graphics: Apart from Photoshop what is the best easy to use program (minimum learning curve)for producing quality drawings suitable for a website?I know that there are many graphic programs around but I want one that is easy to use and produces QUALITY drawings.
(ii) Animations: Similarly I am looking for an easy to use animation program. I have used Flash before but I feel that there is a steep learning curve. Is there a better program out there?
I'd like to setup some lunch-and-learn sessions in my company where we all watch a presentation of some programming-related topics. Where are some good places to find videos about Microsoft technologies with a clear picture and high audio quality that are about 30-60 minutes long?
They could be about design patterns, best practices, new language features, new frameworks, getting better performance, etc.
I am uploading images in c# windows application. I am uploading the images folder wise. In one folder there are 200 to 3000 images. My one images size is about 3.10 MB to 6.2 MB. Its dimensions are 3008 x 1960, 1960 , 4000 x 2600. 6000 x 4000 . while uploading i am reducing the size of image to 400 x 266 or 266 x 400 depending on the height and width of image. but still my image size is about 227 KB. Now i want to reduce the image resolution to decrease the image size.
I am trying to upload large videos(more than 1GB) to youtube from webpage. But youtube is allowing me to upload max 8MB videos. So I want to reduce the size of the video and then upload the reduced video to youtube. So, how to reduce the video size.