473,387 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 2389
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.