468,290 Members | 2,119 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,290 developers. It's quick & easy.

Save or print files in javascript

Hi, i hope my english is good enough to explain my problem.
Okay,
I have a html-file with a image.
But i don't want to save or print the html-file with the image.
I want to save or print a pdf-file (in this pdf-file is the image,
too) without open the pdf-file. It should only open the "save
as"-window or the "print"-window when I push a button.

It'll be nice if somebody can help me.

Thanks.
Jul 23 '05 #1
2 2210
Kitkat wrote:
Hi, i hope my english is good enough to explain my problem.
Okay,
I have a html-file with a image.
But i don't want to save or print the html-file with the image.
I want to save or print a pdf-file (in this pdf-file is the image,
too) without open the pdf-file. It should only open the "save
as"-window or the "print"-window when I push a button.

It'll be nice if somebody can help me.

Thanks.


What you want can not be done using client-side JavaScript in the
default security environment.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
Kitkat wrote:
Hi, i hope my english is good enough to explain my problem.
de.comp.lang.javascript exists but you should get a real name
prior to posting and use newsreader software (because Google
Groups does not declare the umlauts etc.). I recommend Mozilla
Thunderbird for the latter, see my sig.
I have a html-file with a image.
But i don't want to save or print the html-file with the image.
I want to save or print a pdf-file (in this pdf-file is the image,
too) without open the pdf-file. It should only open the "save
as"-window or the "print"-window when I push a button.


That's impossible with client-side scripting. What you can do is to have a
server-side script generate a PDF document on-the-fly and serve it with the
proper MIME-Type and (for IE) filename suffix. HTML2PDF and the like, and
any language that can be used server-side (including J[ava]Script) and can
call this application (JScript in ASP on IIS should be capable) would be the
tools of choice here.
HTH

PointedEars
--
Ein schlanker, leistungsfähiger und standardkonformer
Mail/News-Client ohne viel einzustellen? Geht nicht?
Geht doch! <http://thunderbird.bric.de/>
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by hycn office | last post: by
3 posts views Thread by Steven | last post: by
5 posts views Thread by Poster | last post: by
5 posts views Thread by hp_1981 | last post: by
12 posts views Thread by =?Utf-8?B?RnJlZU5FYXN5?= | last post: by
reply views Thread by NPC403 | last post: by
2 posts views Thread by MrBee | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.