View Single Post
  #4 (permalink)  
Old 01-16-2009, 8:50 AM
JohnH's Avatar
JohnH JohnH is online now
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,317
Reputation: 1315
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

Good! Here's a short explanation of the measurement systems and the conversion that was done. As mentioned image unit is Pixel, the resolution (HorizontalResolution, VerticalResolution) says how many pixels there is per inch, for display devices also called PPI (pixels per inch), so the relation between these give the inch measurement. Since the numbers in PageBounds/MarginBounds is in scale 1:100 we have to multiply the image sizes by 100 to get values in same scale.

DPI relates to PPI by 1:1 for display devices, a printer can have higher resolution and use multiple ink dots per pixel.

For example page width can be 827, which is 8.27in. An image of 400x400 at 150dpi/ppi is 2.67in. wide. The values that is compared in PrintPage handler here would be 827 and 267, and the X value of the point would be (827-267)/2=280.
__________________
Reply With Quote