.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

How to print a picture in its real resolution?

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :Windows Application
 

I have prepared all my mererials in a picure(jpeg format), i wanna print it to a A4 paper without any stretch or shrink.

I found the resolution of a A4 paper in pixel in 794*1123 (in 96dpi), and my picture is exactly this size. And I do this

void pritDocument_PrintPage(object sender, PrintPageEventArgs e)

{

e.Graphics.DrawImage(printImage, 0, 0);

}

However, I find the picture is a bit stretched when preview in a printpreview control. And I found that the A4 paper size is 1169*827...(I think my picture is stretched to this size)

So, what should I do to avoid the stretch?(strectch makes the words in the pictured blur)

And, in my picture, I have considerd margin(left margin equals the right), but the copy i got have a wider left margin... How to avoid this ?




View Complete Post


More Related Resource Links

PRINT vs SELECT of a real type in SQL Management Studio

  

Hi

I know real approximate the value etc. The question from the sample below is why a select in the mangement studio dont use the "nice"/"correct" value like the print function. I tested and for example Reporting Services is clever enouth to use the "correct value".

The problem is that sometimes one want to write a quick manual query and move the output to xls etc.

Thanks

DECLARE @ConversionFactor decimal(18,10)
DECLARE @Limit real
DECLARE @Report_Meas_Result real
DECLARE @BLDVALUE varchar(50)

SET @ConversionFactor = 1000
SET @BLDVALUE = '<0.0002'
SET @Limit = cast(RIGHT(@BLDVALUE, LEN(@BLDVALUE) - 1) as real)
SET @Report_Meas_Result = @Limit/2 


GridView Sorting/Paging : 'REAL' AJAX with Asp.Net Series

  
This is a continuation of my 'REAL' AJAX with Asp.Net (not Asp.Net AJAX) series posts for those of us trying to stop relying on Asp.Net 'AJAX'.

Ok, nothing too dramatic to start things off, we are going to make some tabled data sortable and pagable all without using a bit of postback. Not only that, but it is going to be incredibly easy!

PrintPocketCE Print Pocket Excel, Pocket Word and email files

  
Version 3.560 (May 15, 2009):
bullet

Important bug fix: a slight difference in how some devices create fonts was causing a few devices to have significantly longer print times for large print jobs.
bullet

Adjusted PocketJet printer paper feed commands
bullet

Other minor fixes and enhancements.

Version 3.559 (Mar 5, 2009):
bullet

Added support for Martel MCP78xx printers

Version 3.558 (Aug 20, 2008):
bullet

Added support for Martel MCP78xx printers

Version 3.557 (June 27, 2008):
bullet

Fixed error in Canon printer support
bullet

Fixed COM0 port selection

Version 3.556 (June 15, 2008):
bullet

Added support for Brother MW-260
bullet

Added support for Sato MB400

Version 3.555 (Aug 8, 2007):
bullet

Added support for Pentax RuggedJet 3 and RuggedJet 4 printers
bullet

Changed Epson TM-P60 support to maximum page width of 1200 dots

Version 3.551 (Aug 1, 2006):
bullet

Added Peripheral Nomad printer support

Version 3.550 (Mar 23, 2006):
bullet

Added Panasonic JT-H200PR printer support
bullet

Added Pocket Spectrum printer support
bullet

Fixed problem with WM5.0 "inverted image" problem

bluetooth print via serial port PDA

  
Print via BlueTooth using PDA

extract picture data from a string

  

dears,advance thanks.can anybdy help to solve my problem which is describing below.


Example- %%D1,100,0,0004[data...][0d0a]

Head - %%D1
Amount of data package -100
The data package No. - 0
Data Length -1024 (0004 (low bit in front, high bit in back) 0004= 0x0400=1024;)

data- Original Picture data -1024(maximum)
Tail -0x0d0a
Data in hex

from the above example i want to extract picture data and need to store in to the sql table.sql table columname is image and datatype is also image.after that i wanted to display this image column to an aspx page.

expecting help asap.


how to take print out in asp.net

  

 i want to take print out of asp.net page..

Firstly i want to transfer this content in MsWord file in same format that is on browser screen

then i want to take automatic print out....

how can i do this

Please reply

 


Setting Screen Resolution

  

Hi,

  I am developing a website in asp.net.How can i make my web pages view same in different screen resolutions.I am using 1024*768 resolution


Print command

  

 

Is there a way of setting up a print area for a part of my webpage, I only want to print a certain part of the page, when I select print at the moment it will print the whole page and the layout is rubbish!!
 
Thanks
 
Richard

Print row count on Label

  

Hi,

I have an SP that simply performs a COUNT(*) from a table. I'm am trying to print that number in an ASP Label. It works in Query analyzer but I cant wrap my head around how to display it in a label. Any guidance much appreciated. 

Thank you. 


Upload a Print Screen?

  

Is it possible to Print Screen and then immediately Paste into a .NET app and upload to a server?  I'd like to skip the step of the user having to first paste the screen into an image program and save as a jpg, gif, etc.  Thanks!


Reporting services in 2008 r2 how to get a report in a print button click event in my c#.net page

  

how to  get a report in my c#.net page button lick event also steps to call a report from asp.net to reporting services

 

Thanks in advance


print of crystal report

  

hi all

my crystal report works well but when  i want press button print instead of print ,export it to a file

what should i do for paper print?

thanks in advance  


AppFabric Cache: Real-World Usage and Integration

  

Windows Server AppFabric provides a distributed cache for both web and desktop applications. Well show you how to integrate AppFabric caching into your apps, along with some hints for taking advantage of new cache features in the .NET Framework 4.

Andrea Colaci

MSDN Magazine June 2010


Real-World WF: Best Practices For Windows Workflow Foundation Apps

  

The heart of Windows Workflow Foundation is its declarative programming model. Here are some best practices to consider when using WF to realize software solutions in the real world.

Josh Lane

MSDN Magazine December 2008


Office Development: OBA Solution Patterns In The Real World

  

OBA solution patterns help architects and developers build Office Business Applications (OBAs). This article introduces the seven core OBA solution patterns and applies one to a real-world problem.

Steve Fox

MSDN Magazine March 2008


Toolbox: Automated Build Process, Real-World E-Mail Tasks, and More

  

While the Visual Studio® Build menu's Build Solution option is the usual way developers compile their current work on a project, the process of building the complete solution for testing, deployment, or production often requires many more steps.

Scott Mitchell

MSDN Magazine March 2006


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend