473,320 Members | 2,164 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,320 software developers and data experts.

print from a web app?

I'm developing a web app. Is it possible to allow the user to just
click once, and have my app fetch many image files from the server and
print them all on the user's printer (with no further user
interaction,
including dialog boxes from the client OS)? I'm thinking it may be
possible to do this with a signed applet. Is this the best direction
to be going? Also, are there any products out there that I could use
instead of writing it all from scratch?

Jan 29 '07 #1
3 1145
Larry wrote:
I'm developing a web app. Is it possible to allow the user to just
click once, and have my app fetch many image files from the server and
print them all on the user's printer (with no further user
interaction,
including dialog boxes from the client OS)? I'm thinking it may be
possible to do this with a signed applet. Is this the best direction
to be going? Also, are there any products out there that I could use
instead of writing it all from scratch?
Once the user authorizes a printout your page must already have all the
elements to be printed loaded. This is actually not hard to do. Just
have a hidden division which will be printed out. For example..

<div id='noprint'>All the visible stuff on the screen</div>
<div id='willprint'>All the stuff which will be printed out</div>

In this case on the screen noprint will have a style of display:block
while willprint will have a style of display:none.

You'd then create a css element...
@media print {
.noprint {display: none}
.willprint {display: block}
}

Now when the user hits print, noprint will be hidden and willprint will
be displayed -- at least to the printer. It's a bit of a bait and
switch but it's very useful for removing navigation and advertising
elements which have no business on a printout.

--
http://www.hunlock.com -- Musings in Javascript, CSS.
$FA
Jan 29 '07 #2
"Larry" <la************@gmail.comwrote in message
news:11*********************@a75g2000cwd.googlegro ups.com...
I'm developing a web app. Is it possible to allow the user to just
click once, and have my app fetch many image files from the server and
print them all on the user's printer
You could dynamically fill a document (or frame) with whatever you liked. Then fire the
print.
(with no further user
interaction,
including dialog boxes from the client OS)?
I seriously doubt it.
I'm thinking it may be
possible to do this with a signed applet. Is this the best direction
to be going? Also, are there any products out there that I could use
instead of writing it all from scratch?
I assume you mean a signed script, which you can do with "signtool" which is available to
create a test certificate. For real-world use however you will need to pay a CA
(Certificate Authority) to get a certificate for your digital signature.

But anyway... you are talking about printing a webpage essentially, right?

I would not think you need a signed script for this.

-Lost
Jan 29 '07 #3
On Jan 29, 2:05 am, "-Lost" <spam_ninjaREMOV...@REMOVEMEcomcast.net>
wrote:
"Larry" <larry.grant...@gmail.comwrote in messagenews:11*********************@a75g2000cwd.go oglegroups.com...
I'm developing a web app. Is it possible to allow the user to just
click once, and have my app fetch many image files from the server and
print them all on the user's printerYou could dynamically fill a document (or frame) with whatever you liked. Then fire the
print.
(with no further user
interaction,
including dialog boxes from the client OS)?I seriously doubt it.
I'm thinking it may be
possible to do this with a signed applet. Is this the best direction
to be going? Also, are there any products out there that I could use
instead of writing it all from scratch?I assume you mean a signed script, which you can do with "signtool" which is available to
create a test certificate. For real-world use however you will need to pay a CA
(Certificate Authority) to get a certificate for your digital signature.

But anyway... you are talking about printing a webpage essentially, right?
No... I don't want to print a webpage. I want to print many *images*
which will be in separate files on the web server. It will also be
*many* images, around 100. As for the OS dialog box, it's OK if it
comes up once, but not 100 times. Would that be possible?

Jan 29 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Michael Foord | last post by:
Here's a little oddity with 'print' being a reserved word... >>> class thing: pass >>> something = thing() >>> something.print = 3 SyntaxError: invalid syntax >>> print something.__dict__...
14
by: Marcin Ciura | last post by:
Here is a pre-PEP about print that I wrote recently. Please let me know what is the community's opinion on it. Cheers, Marcin PEP: XXX Title: Print Without Intervening Space Version:...
0
by: bearophileHUGS | last post by:
There is/was a long discussion about the replacement for print in Python 3.0 (I don't know if this discussion is finished): http://mail.python.org/pipermail/python-dev/2005-September/055968.html ...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
1
by: Steff | last post by:
I am wandering if my code is making sense... I use a lot the print function. Is it weird in this case where I have to display an array ? I thought it would be better to have the entire array in php...
3
by: James J. Besemer | last post by:
I would like to champion a proposed enhancement to Python. I describe the basic idea below, in order to gage community interest. Right now, it's only an idea, and I'm sure there's room for...
69
by: Edward K Ream | last post by:
The pros and cons of making 'print' a function in Python 3.x are well discussed at: http://mail.python.org/pipermail/python-dev/2005-September/056154.html Alas, it appears that the effect of...
2
by: Brad Pears | last post by:
I have some sample code that uses the print dialog, print preview and a print direct options. If I select print preview and then click the printer icon from that, the document prints. If I...
7
by: samslists | last post by:
Am I the only one that thinks this would be useful? :) I'd really like to be able to use python 3.0's print statement in 2.x. Is this at least being considered as an option for 2.6? It seems...
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.