TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rohit Arora
NA
2
0
how to calculate Image size in pixel to Print on A4 size sheet
Jul 6 2010 1:16 AM
hi
I am generating an image with GDI+ and pasting it in Excel work sheet. I am setting Excel sheet print size as A4 (8.27" X 11.69").
I want to generate image so that it should fit in A4 perfectly, but I am unable to calculate image size in pixels to fit perfectly in 8.27" X 11.69" inches. My system default setting is 96 dpi.
I applied some logic:-
Dim g As Graphics = this.CreateGraphics()
image.Width = CInt(8.27 * g.DpiX)
image.Height = CInt(11.69 * g.DpiY)
but image is not still printing within A4. Is there anything that I am missing ?
Thanks
Reply
Answers (
2
)
Word Document Printing
how to open cash drawer of POS printer