avatar
HTML print an image# Programming - 葵花宝典
F*p
1
I want to print an image inside a HTML. Since the image could be very large, I
want to add one button on the page and click it to export to a printer and
automatically have a nice layout. Now, i can print 1/4 of the whole image
since it is too big to hold in a 8*11 paper.
I know Windows Fax/Picture Viewer has this nice function, how can I do this
within a webpage without saving/opening/printing it ??
Thanks for your reading and help !!
avatar
c*t
2
piece of js could do the job.

big
on

【在 F**p 的大作中提到】
: I want to print an image inside a HTML. Since the image could be very large, I
: want to add one button on the page and click it to export to a printer and
: automatically have a nice layout. Now, i can print 1/4 of the whole image
: since it is too big to hold in a 8*11 paper.
: I know Windows Fax/Picture Viewer has this nice function, how can I do this
: within a webpage without saving/opening/printing it ??
: Thanks for your reading and help !!

avatar
F*p
3
it looks that is a solution. The problem we met is not very common: we use
some dll to generate an image which has X*Y pixels dimension. Since it only
generate JPEG image with certain quality by X*Y pixel, we have to increase the
width and height so as to have a large, say 2X*2Y sized image, then print it
out to get a better quality. I am not sure if I scaled down the image, if I
lose the quality when printing it out....
thanks Xentar !

image
avatar
X*r
4
Why can't you create a new browser window which contains the scaled-down image
when the user clicks your button and print the content of that new window?

I

【在 F**p 的大作中提到】
: I want to print an image inside a HTML. Since the image could be very large, I
: want to add one button on the page and click it to export to a printer and
: automatically have a nice layout. Now, i can print 1/4 of the whole image
: since it is too big to hold in a 8*11 paper.
: I know Windows Fax/Picture Viewer has this nice function, how can I do this
: within a webpage without saving/opening/printing it ??
: Thanks for your reading and help !!

avatar
F*p
5
it looks that is a solution. The problem we met is not very common: we use
some dll to generate an image which has X*Y pixels dimension. Since it only
generate JPEG image with certain quality by X*Y pixel, we have to increase the
width and height so as to have a large, say 2X*2Y sized image, then print it
out to get a better quality. I am not sure if I scaled down the image, if I
lose the quality when printing it out....
thanks Xentar !

image

【在 X****r 的大作中提到】
: Why can't you create a new browser window which contains the scaled-down image
: when the user clicks your button and print the content of that new window?
:
: I

avatar
c*t
6
just like flickr does.

【在 c**t 的大作中提到】
: piece of js could do the job.
:
: big
: on

avatar
c*t
7
IE has a feature: move mouse over the picture, it will pop out "print",
"email" buttons. I guess you have to wait till its completion. Or you m
ay print screen to print 1/4 or what ever percentage image.

I

【在 F**p 的大作中提到】
: I want to print an image inside a HTML. Since the image could be very large, I
: want to add one button on the page and click it to export to a printer and
: automatically have a nice layout. Now, i can print 1/4 of the whole image
: since it is too big to hold in a 8*11 paper.
: I know Windows Fax/Picture Viewer has this nice function, how can I do this
: within a webpage without saving/opening/printing it ??
: Thanks for your reading and help !!

avatar
s*i
8
the best method is dynamically creating PDF rather than JPEG.
you guarantee to get same result across browsers and platforms.
or you could try using CSS, specify media as print, and sends
different versions of JPEG, one for view, one for print. but
I haven't tested whether the print version is printed at 300
dpi or about 72. I think you can specify resolution, but no
idea the support of browsers.

the
it

【在 F**p 的大作中提到】
: it looks that is a solution. The problem we met is not very common: we use
: some dll to generate an image which has X*Y pixels dimension. Since it only
: generate JPEG image with certain quality by X*Y pixel, we have to increase the
: width and height so as to have a large, say 2X*2Y sized image, then print it
: out to get a better quality. I am not sure if I scaled down the image, if I
: lose the quality when printing it out....
: thanks Xentar !
:
: image

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。