472,982 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,982 software developers and data experts.

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 2369
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: hycn office | last post by:
how to print with pre-define preference such as margin and page size ? and a quick Question , the function call to save as thanks ~~~~~~~
3
by: Steven | last post by:
Hi all, Is it possible to do an ie print from javascript that does not bring up the print dialog? I'm in a situation where i need to load a sequence of files into a browser and print all of...
4
by: Julie Siebel | last post by:
Apologies...I'm sure this has been asked before, but I can't seem to come up with the correct Google search terms. While my problem is with stylesheets, the errors are being caused by my...
5
by: Poster | last post by:
I have a script, its outputs are in HTML. It displays perferctly in a browser, however when I view source, it gives me the JS scripts, but I want to view the HTML output. Is there a way I can view...
2
by: Steve | last post by:
How do you programatically save files that are attached to an email to a specified folder? It could be one file or multiple files attached to the email. Can it be done if Outlook Express is being...
5
by: hp_1981 | last post by:
Hi Is there anyway avoiding users to save my web pages? this idea came to my mind when I tried to save a web page, but in the middle of saving progress something like the following error...
12
by: =?Utf-8?B?RnJlZU5FYXN5?= | last post by:
Hello, the scenario: There's an ASPX page which shows some text and has three buttons at the bottom: Save, Print and Close. Print and close is done by javascript. But how can I save the page...
3
by: Angus | last post by:
I have a web page with a toolbar containing a Save button. The Save button can change contextually to be a Search button in some cases. Hence the button name searchsavechanges. The snippet of...
3
by: evenlater | last post by:
I have an Access application on a terminal server. Sometimes my users need to export reports to pdf, rtf or xls files and save them to their own client device hard drives. They can do that right...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.