473,586 Members | 2,491 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1153
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'>Al l 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******** *************@a 75g2000cwd.goog legroups.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_ninjaREMO V...@REMOVEMEco mcast.net>
wrote:
"Larry" <larry.grant... @gmail.comwrote in messagenews:11* *************** *****@a75g2000c wd.googlegroups .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
2391
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
2899
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: $Revision: 0.0 $
0
1819
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 There is also a wiki page that collects the ideas: http://wiki.python.org/moin/PrintAsFunction There is the will to keep the printing operation...
1
5697
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 of a Microsoft book, "Visual Basic,Net Step by Step" in Chapter 18. All but the bottom two subroutines will open a text file, and then allow me...
1
2317
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 but now I am not sure if that makes sense. Can you tell me please ? <html> <head>
3
2103
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 improvement. And of course it's possible there's some serious "gotcha" I've overlooked. Thus I welcome any and all comments. If there's some...
69
3204
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 this pep would be to make it impossible to use the name 'print' in a backward compatible manner. Indeed, if a program is to compile in both Python...
2
22108
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 select the print directly option, it also prints right away to the defauilt printer. However, if I use the printer dialog control to print and I click...
7
10753
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 like it would be helpful with transitioning.
12
3519
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 print the report three times, but do not know how
0
7915
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7841
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8339
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6617
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3838
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.