-
How to, automatically, print a doc on a client
Hi everybody...
I have an application where I have to send the client a Word document, but I
don't want him/her to see it, just to print it.
I have made an ASP page where I have an IFRAME with width and height 0. The
page informs the user that the document is ready and it has a button to be
able to print it. But I can't get it to work
At the "parent" page I have something like
Function btnPrint_onClick()
window.frames("id_ifrPrintableDoc").print
End Function
Where "id_ifrPrintableDoc" is the id of the IFRAME which contains the Word
doc downloaded. But it doesn't work... it just prints the parent ASP page.
What am I doing wrong? Is it possible to do this? Is there any other way to
do this?
Thank you in advance... any hint will be very appreciated
Pep
pep@impulso.net
-
Re: How to, automatically, print a doc on a client
Pep,
I came acros the same requirement in one of my earlier projects. That time
I could create the document in the web server and stream it to the client's
box. But I could not trigger the printing from client box. Hence I triggered
printing directly from my web server itself. Is it not possible for you to
trigger printing from yr web server instead?
Harish
"Pep Gómez" <pep@ati.es> wrote:
>Hi everybody...
>I have an application where I have to send the client a Word document, but
I
>don't want him/her to see it, just to print it.
>I have made an ASP page where I have an IFRAME with width and height 0.
The
>page informs the user that the document is ready and it has a button to
be
>able to print it. But I can't get it to work
>At the "parent" page I have something like
>
>Function btnPrint_onClick()
> window.frames("id_ifrPrintableDoc").print
>End Function
>
>Where "id_ifrPrintableDoc" is the id of the IFRAME which contains the Word
>doc downloaded. But it doesn't work... it just prints the parent ASP page.
>What am I doing wrong? Is it possible to do this? Is there any other way
to
>do this?
>
>Thank you in advance... any hint will be very appreciated
>
>Pep
>pep@impulso.net
>
>
>
-
Re: How to, automatically, print a doc on a client
Hi Harish.... and thank you for your response.
Sorry but I don't understand the solution you are proposing... what do you
mean triggering the printing from the web server? Can you do that? If so,
how?
If the solution you are proposing is printing the document on the server it
wouldnt be useful in my case, but if what you are saying is triggering the
printing on the client from the server, that would be great.
Thank you
Pep
pep@impulso.net
"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
news:3cdbd830$1@10.1.10.29...
>
> Pep,
>
> I came acros the same requirement in one of my earlier projects. That time
> I could create the document in the web server and stream it to the
client's
> box. But I could not trigger the printing from client box. Hence I
triggered
> printing directly from my web server itself. Is it not possible for you to
> trigger printing from yr web server instead?
>
> Harish
>
>
> "Pep Gómez" <pep@ati.es> wrote:
> >Hi everybody...
> >I have an application where I have to send the client a Word document,
but
> I
> >don't want him/her to see it, just to print it.
> >I have made an ASP page where I have an IFRAME with width and height 0.
> The
> >page informs the user that the document is ready and it has a button to
> be
> >able to print it. But I can't get it to work
> >At the "parent" page I have something like
> >
> >Function btnPrint_onClick()
> > window.frames("id_ifrPrintableDoc").print
> >End Function
> >
> >Where "id_ifrPrintableDoc" is the id of the IFRAME which contains the
Word
> >doc downloaded. But it doesn't work... it just prints the parent ASP
page.
> >What am I doing wrong? Is it possible to do this? Is there any other way
> to
> >do this?
> >
> >Thank you in advance... any hint will be very appreciated
> >
> >Pep
> >pep@impulso.net
> >
> >
> >
>
-
Re: How to, automatically, print a doc on a client
Pep,
The requirement was -
One Department (Help Desk) wanted couple of MS Word reports to be generated
and printed. In that client's place, each Department had a separate printer
earmarked for them. So the document that was generated has to be printed
in this printer. All this has to happen without the document being displayed
in user's machine.
The solution that I had implemented -
The document that was generated was huge in size. So I had quite a few problems
like memory clogging up, performance, etc in our web server. Hence, I had
suggested some other possibilities like generating plain HTML reports, PDF
etc. But the client was very particular in MS Word. After beefing up the
web server, I had set the Help Desk department printer as the default printer
in that web server. Once the document was generated, I trigerred the printing
of it directly from the web server itself. This still works fine for them.
But my advise would be - instead of generating Word reports, if possible,
try to use some other means of generating report. MS Word is a white cow.
It eats up lots of processing power.
Harish
"Pep Gómez" <pep@impulso.net> wrote:
>Hi Harish.... and thank you for your response.
>Sorry but I don't understand the solution you are proposing... what do you
>mean triggering the printing from the web server? Can you do that? If so,
>how?
>If the solution you are proposing is printing the document on the server
it
>wouldnt be useful in my case, but if what you are saying is triggering the
>printing on the client from the server, that would be great.
>
>Thank you
>
>Pep
>pep@impulso.net
>
>"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
>news:3cdbd830$1@10.1.10.29...
>>
>> Pep,
>>
>> I came acros the same requirement in one of my earlier projects. That
time
>> I could create the document in the web server and stream it to the
>client's
>> box. But I could not trigger the printing from client box. Hence I
>triggered
>> printing directly from my web server itself. Is it not possible for you
to
>> trigger printing from yr web server instead?
>>
>> Harish
>>
>>
>> "Pep Gómez" <pep@ati.es> wrote:
>> >Hi everybody...
>> >I have an application where I have to send the client a Word document,
>but
>> I
>> >don't want him/her to see it, just to print it.
>> >I have made an ASP page where I have an IFRAME with width and height
0.
>> The
>> >page informs the user that the document is ready and it has a button
to
>> be
>> >able to print it. But I can't get it to work
>> >At the "parent" page I have something like
>> >
>> >Function btnPrint_onClick()
>> > window.frames("id_ifrPrintableDoc").print
>> >End Function
>> >
>> >Where "id_ifrPrintableDoc" is the id of the IFRAME which contains the
>Word
>> >doc downloaded. But it doesn't work... it just prints the parent ASP
>page.
>> >What am I doing wrong? Is it possible to do this? Is there any other
way
>> to
>> >do this?
>> >
>> >Thank you in advance... any hint will be very appreciated
>> >
>> >Pep
>> >pep@impulso.net
>> >
>> >
>> >
>>
>
>
-
Re: How to, automatically, print a doc on a client
Thank you Harish....
What I have decided to do is to generate an RTF document, as MS suggests. I
have implemented kind of a "home made"parser, which detects the marks I
need on the RTF document, replace them with the data the costumer wants, and
so, I have an RTF document, with the data the user wants, and without having
to "play" with Word from the server.
Then, I send this RTF document to the client and that's it. But I keep
having the same problem, I want to print this document on the client without
him/her seeing the document itself (with some kind of button or whatever
which triggers the printer dialog).
So, Im stuck at this point :-(
Thank you anyway, really :-)
Pep
pep@impulso.net
"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
news:3cdf802f$1@10.1.10.29...
>
> Pep,
>
> The requirement was -
> One Department (Help Desk) wanted couple of MS Word reports to be
generated
> and printed. In that client's place, each Department had a separate
printer
> earmarked for them. So the document that was generated has to be printed
> in this printer. All this has to happen without the document being
displayed
> in user's machine.
>
> The solution that I had implemented -
> The document that was generated was huge in size. So I had quite a few
problems
> like memory clogging up, performance, etc in our web server. Hence, I had
> suggested some other possibilities like generating plain HTML reports, PDF
> etc. But the client was very particular in MS Word. After beefing up the
> web server, I had set the Help Desk department printer as the default
printer
> in that web server. Once the document was generated, I trigerred the
printing
> of it directly from the web server itself. This still works fine for them.
>
> But my advise would be - instead of generating Word reports, if possible,
> try to use some other means of generating report. MS Word is a white cow.
> It eats up lots of processing power.
>
> Harish
>
> "Pep Gómez" <pep@impulso.net> wrote:
> >Hi Harish.... and thank you for your response.
> >Sorry but I don't understand the solution you are proposing... what do
you
> >mean triggering the printing from the web server? Can you do that? If so,
> >how?
> >If the solution you are proposing is printing the document on the server
> it
> >wouldnt be useful in my case, but if what you are saying is triggering
the
> >printing on the client from the server, that would be great.
> >
> >Thank you
> >
> >Pep
> >pep@impulso.net
> >
> >"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
> >news:3cdbd830$1@10.1.10.29...
> >>
> >> Pep,
> >>
> >> I came acros the same requirement in one of my earlier projects. That
> time
> >> I could create the document in the web server and stream it to the
> >client's
> >> box. But I could not trigger the printing from client box. Hence I
> >triggered
> >> printing directly from my web server itself. Is it not possible for you
> to
> >> trigger printing from yr web server instead?
> >>
> >> Harish
> >>
> >>
> >> "Pep Gómez" <pep@ati.es> wrote:
> >> >Hi everybody...
> >> >I have an application where I have to send the client a Word document,
> >but
> >> I
> >> >don't want him/her to see it, just to print it.
> >> >I have made an ASP page where I have an IFRAME with width and height
> 0.
> >> The
> >> >page informs the user that the document is ready and it has a button
> to
> >> be
> >> >able to print it. But I can't get it to work
> >> >At the "parent" page I have something like
> >> >
> >> >Function btnPrint_onClick()
> >> > window.frames("id_ifrPrintableDoc").print
> >> >End Function
> >> >
> >> >Where "id_ifrPrintableDoc" is the id of the IFRAME which contains the
> >Word
> >> >doc downloaded. But it doesn't work... it just prints the parent ASP
> >page.
> >> >What am I doing wrong? Is it possible to do this? Is there any other
> way
> >> to
> >> >do this?
> >> >
> >> >Thank you in advance... any hint will be very appreciated
> >> >
> >> >Pep
> >> >pep@impulso.net
> >> >
> >> >
> >> >
> >>
> >
> >
>
-
Re: How to, automatically, print a doc on a client
VIA WEB, you cannot trigger printing on a clients machine without them knowing....imagine
the security issue....every time you go to someones web page they send a
document to thier printer...anyway I have a close example of how to do it...
<script language=VBScript><!-- //
Sub VBPrint() On Error Resume Next
WBControl.ExecWB 6,1
End Sub
//--></script>
<script language=JavaScript><!-- //
if (window.print)
self.print();
else if (navigator.appName.indexOf('Microsoft') !=-1)
VBPrint()
setTimeout('self.close()',3000);
//--></script>
I use this by opening a window target=_blank with the previous Jscript in
it...it opens the print dialog and after the user oks or cancels the window
closes...
"Pep Gómez" <pep@impulso.net> wrote:
>Thank you Harish....
>What I have decided to do is to generate an RTF document, as MS suggests.
I
>have implemented kind of a "home made"parser, which detects the marks I
>need on the RTF document, replace them with the data the costumer wants,
and
>so, I have an RTF document, with the data the user wants, and without having
>to "play" with Word from the server.
>Then, I send this RTF document to the client and that's it. But I keep
>having the same problem, I want to print this document on the client without
>him/her seeing the document itself (with some kind of button or whatever
>which triggers the printer dialog).
>So, Im stuck at this point :-(
>
>Thank you anyway, really :-)
>
>Pep
>pep@impulso.net
>
>"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
>news:3cdf802f$1@10.1.10.29...
>>
>> Pep,
>>
>> The requirement was -
>> One Department (Help Desk) wanted couple of MS Word reports to be
>generated
>> and printed. In that client's place, each Department had a separate
>printer
>> earmarked for them. So the document that was generated has to be printed
>> in this printer. All this has to happen without the document being
>displayed
>> in user's machine.
>>
>> The solution that I had implemented -
>> The document that was generated was huge in size. So I had quite a few
>problems
>> like memory clogging up, performance, etc in our web server. Hence, I
had
>> suggested some other possibilities like generating plain HTML reports,
PDF
>> etc. But the client was very particular in MS Word. After beefing up the
>> web server, I had set the Help Desk department printer as the default
>printer
>> in that web server. Once the document was generated, I trigerred the
>printing
>> of it directly from the web server itself. This still works fine for them.
>>
>> But my advise would be - instead of generating Word reports, if possible,
>> try to use some other means of generating report. MS Word is a white cow.
>> It eats up lots of processing power.
>>
>> Harish
>>
>> "Pep Gómez" <pep@impulso.net> wrote:
>> >Hi Harish.... and thank you for your response.
>> >Sorry but I don't understand the solution you are proposing... what do
>you
>> >mean triggering the printing from the web server? Can you do that? If
so,
>> >how?
>> >If the solution you are proposing is printing the document on the server
>> it
>> >wouldnt be useful in my case, but if what you are saying is triggering
>the
>> >printing on the client from the server, that would be great.
>> >
>> >Thank you
>> >
>> >Pep
>> >pep@impulso.net
>> >
>> >"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
>> >news:3cdbd830$1@10.1.10.29...
>> >>
>> >> Pep,
>> >>
>> >> I came acros the same requirement in one of my earlier projects. That
>> time
>> >> I could create the document in the web server and stream it to the
>> >client's
>> >> box. But I could not trigger the printing from client box. Hence I
>> >triggered
>> >> printing directly from my web server itself. Is it not possible for
you
>> to
>> >> trigger printing from yr web server instead?
>> >>
>> >> Harish
>> >>
>> >>
>> >> "Pep Gómez" <pep@ati.es> wrote:
>> >> >Hi everybody...
>> >> >I have an application where I have to send the client a Word document,
>> >but
>> >> I
>> >> >don't want him/her to see it, just to print it.
>> >> >I have made an ASP page where I have an IFRAME with width and height
>> 0.
>> >> The
>> >> >page informs the user that the document is ready and it has a button
>> to
>> >> be
>> >> >able to print it. But I can't get it to work
>> >> >At the "parent" page I have something like
>> >> >
>> >> >Function btnPrint_onClick()
>> >> > window.frames("id_ifrPrintableDoc").print
>> >> >End Function
>> >> >
>> >> >Where "id_ifrPrintableDoc" is the id of the IFRAME which contains
the
>> >Word
>> >> >doc downloaded. But it doesn't work... it just prints the parent ASP
>> >page.
>> >> >What am I doing wrong? Is it possible to do this? Is there any other
>> way
>> >> to
>> >> >do this?
>> >> >
>> >> >Thank you in advance... any hint will be very appreciated
>> >> >
>> >> >Pep
>> >> >pep@impulso.net
>> >> >
>> >> >
>> >> >
>> >>
>> >
>> >
>>
>
>
-
Re: How to, automatically, print a doc on a client
I see, but I don't see the difference between this code and triggering a
"window.print". If, with this code, I could hide the printer dialog, it
would be great (I also understand it would be kind of dangerous)... but I
have tried with "ExecWB 6,2", in the documentation, it says that the second
parameter, with a 2, hides the dialog, but the dialog still appears.
Pep
pep@impulso.net
"JS" <jakesmsu@hotmail.com> escribió en el mensaje
news:3cdfd488$1@10.1.10.29...
>
> VIA WEB, you cannot trigger printing on a clients machine without them
knowing....imagine
> the security issue....every time you go to someones web page they send a
> document to thier printer...anyway I have a close example of how to do
it...
>
> <script language=VBScript><!-- //
> Sub VBPrint() On Error Resume Next
> WBControl.ExecWB 6,1
> End Sub
> //--></script>
>
> <script language=JavaScript><!-- //
> if (window.print)
> self.print();
> else if (navigator.appName.indexOf('Microsoft') !=-1)
> VBPrint()
> setTimeout('self.close()',3000);
> //--></script>
>
> I use this by opening a window target=_blank with the previous Jscript in
> it...it opens the print dialog and after the user oks or cancels the
window
> closes...
>
>
> "Pep Gómez" <pep@impulso.net> wrote:
> >Thank you Harish....
> >What I have decided to do is to generate an RTF document, as MS
suggests.
> I
> >have implemented kind of a "home made"parser, which detects the marks I
> >need on the RTF document, replace them with the data the costumer wants,
> and
> >so, I have an RTF document, with the data the user wants, and without
having
> >to "play" with Word from the server.
> >Then, I send this RTF document to the client and that's it. But I keep
> >having the same problem, I want to print this document on the client
without
> >him/her seeing the document itself (with some kind of button or whatever
> >which triggers the printer dialog).
> >So, Im stuck at this point :-(
> >
> >Thank you anyway, really :-)
> >
> >Pep
> >pep@impulso.net
> >
> >"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
> >news:3cdf802f$1@10.1.10.29...
> >>
> >> Pep,
> >>
> >> The requirement was -
> >> One Department (Help Desk) wanted couple of MS Word reports to be
> >generated
> >> and printed. In that client's place, each Department had a separate
> >printer
> >> earmarked for them. So the document that was generated has to be
printed
> >> in this printer. All this has to happen without the document being
> >displayed
> >> in user's machine.
> >>
> >> The solution that I had implemented -
> >> The document that was generated was huge in size. So I had quite a few
> >problems
> >> like memory clogging up, performance, etc in our web server. Hence, I
> had
> >> suggested some other possibilities like generating plain HTML reports,
> PDF
> >> etc. But the client was very particular in MS Word. After beefing up
the
> >> web server, I had set the Help Desk department printer as the default
> >printer
> >> in that web server. Once the document was generated, I trigerred the
> >printing
> >> of it directly from the web server itself. This still works fine for
them.
> >>
> >> But my advise would be - instead of generating Word reports, if
possible,
> >> try to use some other means of generating report. MS Word is a white
cow.
> >> It eats up lots of processing power.
> >>
> >> Harish
> >>
> >> "Pep Gómez" <pep@impulso.net> wrote:
> >> >Hi Harish.... and thank you for your response.
> >> >Sorry but I don't understand the solution you are proposing... what do
> >you
> >> >mean triggering the printing from the web server? Can you do that? If
> so,
> >> >how?
> >> >If the solution you are proposing is printing the document on the
server
> >> it
> >> >wouldnt be useful in my case, but if what you are saying is triggering
> >the
> >> >printing on the client from the server, that would be great.
> >> >
> >> >Thank you
> >> >
> >> >Pep
> >> >pep@impulso.net
> >> >
> >> >"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
> >> >news:3cdbd830$1@10.1.10.29...
> >> >>
> >> >> Pep,
> >> >>
> >> >> I came acros the same requirement in one of my earlier projects.
That
> >> time
> >> >> I could create the document in the web server and stream it to the
> >> >client's
> >> >> box. But I could not trigger the printing from client box. Hence I
> >> >triggered
> >> >> printing directly from my web server itself. Is it not possible for
> you
> >> to
> >> >> trigger printing from yr web server instead?
> >> >>
> >> >> Harish
> >> >>
> >> >>
> >> >> "Pep Gómez" <pep@ati.es> wrote:
> >> >> >Hi everybody...
> >> >> >I have an application where I have to send the client a Word
document,
> >> >but
> >> >> I
> >> >> >don't want him/her to see it, just to print it.
> >> >> >I have made an ASP page where I have an IFRAME with width and
height
> >> 0.
> >> >> The
> >> >> >page informs the user that the document is ready and it has a
button
> >> to
> >> >> be
> >> >> >able to print it. But I can't get it to work
> >> >> >At the "parent" page I have something like
> >> >> >
> >> >> >Function btnPrint_onClick()
> >> >> > window.frames("id_ifrPrintableDoc").print
> >> >> >End Function
> >> >> >
> >> >> >Where "id_ifrPrintableDoc" is the id of the IFRAME which contains
> the
> >> >Word
> >> >> >doc downloaded. But it doesn't work... it just prints the parent
ASP
> >> >page.
> >> >> >What am I doing wrong? Is it possible to do this? Is there any
other
> >> way
> >> >> to
> >> >> >do this?
> >> >> >
> >> >> >Thank you in advance... any hint will be very appreciated
> >> >> >
> >> >> >Pep
> >> >> >pep@impulso.net
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >
> >> >
> >>
> >
> >
>
-
Re: How to, automatically, print a doc on a client
Pep,
For hiding printer dialog -
I used to use a free ActiveX control (ScriptX) from www.meadroid.com. Using
this, you can control page orientation, margins, etc.
Harish
"Pep Gómez" <pep@impulso.net> wrote:
>I see, but I don't see the difference between this code and triggering a
>"window.print". If, with this code, I could hide the printer dialog, it
>would be great (I also understand it would be kind of dangerous)... but
I
>have tried with "ExecWB 6,2", in the documentation, it says that the second
>parameter, with a 2, hides the dialog, but the dialog still appears.
>
>Pep
>pep@impulso.net
>
>"JS" <jakesmsu@hotmail.com> escribió en el mensaje
>news:3cdfd488$1@10.1.10.29...
>>
>> VIA WEB, you cannot trigger printing on a clients machine without them
>knowing....imagine
>> the security issue....every time you go to someones web page they send
a
>> document to thier printer...anyway I have a close example of how to do
>it...
>>
>> <script language=VBScript><!-- //
>> Sub VBPrint() On Error Resume Next
>> WBControl.ExecWB 6,1
>> End Sub
>> //--></script>
>>
>> <script language=JavaScript><!-- //
>> if (window.print)
>> self.print();
>> else if (navigator.appName.indexOf('Microsoft') !=-1)
>> VBPrint()
>> setTimeout('self.close()',3000);
>> //--></script>
>>
>> I use this by opening a window target=_blank with the previous Jscript
in
>> it...it opens the print dialog and after the user oks or cancels the
>window
>> closes...
>>
>>
>> "Pep Gómez" <pep@impulso.net> wrote:
>> >Thank you Harish....
>> >What I have decided to do is to generate an RTF document, as MS
>suggests.
>> I
>> >have implemented kind of a "home made"parser, which detects the marks
I
>> >need on the RTF document, replace them with the data the costumer wants,
>> and
>> >so, I have an RTF document, with the data the user wants, and without
>having
>> >to "play" with Word from the server.
>> >Then, I send this RTF document to the client and that's it. But I keep
>> >having the same problem, I want to print this document on the client
>without
>> >him/her seeing the document itself (with some kind of button or whatever
>> >which triggers the printer dialog).
>> >So, Im stuck at this point :-(
>> >
>> >Thank you anyway, really :-)
>> >
>> >Pep
>> >pep@impulso.net
>> >
>> >"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
>> >news:3cdf802f$1@10.1.10.29...
>> >>
>> >> Pep,
>> >>
>> >> The requirement was -
>> >> One Department (Help Desk) wanted couple of MS Word reports to be
>> >generated
>> >> and printed. In that client's place, each Department had a separate
>> >printer
>> >> earmarked for them. So the document that was generated has to be
>printed
>> >> in this printer. All this has to happen without the document being
>> >displayed
>> >> in user's machine.
>> >>
>> >> The solution that I had implemented -
>> >> The document that was generated was huge in size. So I had quite a
few
>> >problems
>> >> like memory clogging up, performance, etc in our web server. Hence,
I
>> had
>> >> suggested some other possibilities like generating plain HTML reports,
>> PDF
>> >> etc. But the client was very particular in MS Word. After beefing up
>the
>> >> web server, I had set the Help Desk department printer as the default
>> >printer
>> >> in that web server. Once the document was generated, I trigerred the
>> >printing
>> >> of it directly from the web server itself. This still works fine for
>them.
>> >>
>> >> But my advise would be - instead of generating Word reports, if
>possible,
>> >> try to use some other means of generating report. MS Word is a white
>cow.
>> >> It eats up lots of processing power.
>> >>
>> >> Harish
>> >>
>> >> "Pep Gómez" <pep@impulso.net> wrote:
>> >> >Hi Harish.... and thank you for your response.
>> >> >Sorry but I don't understand the solution you are proposing... what
do
>> >you
>> >> >mean triggering the printing from the web server? Can you do that?
If
>> so,
>> >> >how?
>> >> >If the solution you are proposing is printing the document on the
>server
>> >> it
>> >> >wouldnt be useful in my case, but if what you are saying is triggering
>> >the
>> >> >printing on the client from the server, that would be great.
>> >> >
>> >> >Thank you
>> >> >
>> >> >Pep
>> >> >pep@impulso.net
>> >> >
>> >> >"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
>> >> >news:3cdbd830$1@10.1.10.29...
>> >> >>
>> >> >> Pep,
>> >> >>
>> >> >> I came acros the same requirement in one of my earlier projects.
>That
>> >> time
>> >> >> I could create the document in the web server and stream it to the
>> >> >client's
>> >> >> box. But I could not trigger the printing from client box. Hence
I
>> >> >triggered
>> >> >> printing directly from my web server itself. Is it not possible
for
>> you
>> >> to
>> >> >> trigger printing from yr web server instead?
>> >> >>
>> >> >> Harish
>> >> >>
>> >> >>
>> >> >> "Pep Gómez" <pep@ati.es> wrote:
>> >> >> >Hi everybody...
>> >> >> >I have an application where I have to send the client a Word
>document,
>> >> >but
>> >> >> I
>> >> >> >don't want him/her to see it, just to print it.
>> >> >> >I have made an ASP page where I have an IFRAME with width and
>height
>> >> 0.
>> >> >> The
>> >> >> >page informs the user that the document is ready and it has a
>button
>> >> to
>> >> >> be
>> >> >> >able to print it. But I can't get it to work
>> >> >> >At the "parent" page I have something like
>> >> >> >
>> >> >> >Function btnPrint_onClick()
>> >> >> > window.frames("id_ifrPrintableDoc").print
>> >> >> >End Function
>> >> >> >
>> >> >> >Where "id_ifrPrintableDoc" is the id of the IFRAME which contains
>> the
>> >> >Word
>> >> >> >doc downloaded. But it doesn't work... it just prints the parent
>ASP
>> >> >page.
>> >> >> >What am I doing wrong? Is it possible to do this? Is there any
>other
>> >> way
>> >> >> to
>> >> >> >do this?
>> >> >> >
>> >> >> >Thank you in advance... any hint will be very appreciated
>> >> >> >
>> >> >> >Pep
>> >> >> >pep@impulso.net
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >>
>> >
>> >
>>
>
>
-
Re: How to, automatically, print a doc on a client
You cant get them past the printer dialog box. Nothing will, it's there for
security.
"Pep Gómez" <pep@impulso.net> wrote:
>I see, but I don't see the difference between this code and triggering a
>"window.print". If, with this code, I could hide the printer dialog, it
>would be great (I also understand it would be kind of dangerous)... but
I
>have tried with "ExecWB 6,2", in the documentation, it says that the second
>parameter, with a 2, hides the dialog, but the dialog still appears.
>
>Pep
>pep@impulso.net
>
>"JS" <jakesmsu@hotmail.com> escribió en el mensaje
>news:3cdfd488$1@10.1.10.29...
>>
>> VIA WEB, you cannot trigger printing on a clients machine without them
>knowing....imagine
>> the security issue....every time you go to someones web page they send
a
>> document to thier printer...anyway I have a close example of how to do
>it...
>>
>> <script language=VBScript><!-- //
>> Sub VBPrint() On Error Resume Next
>> WBControl.ExecWB 6,1
>> End Sub
>> //--></script>
>>
>> <script language=JavaScript><!-- //
>> if (window.print)
>> self.print();
>> else if (navigator.appName.indexOf('Microsoft') !=-1)
>> VBPrint()
>> setTimeout('self.close()',3000);
>> //--></script>
>>
>> I use this by opening a window target=_blank with the previous Jscript
in
>> it...it opens the print dialog and after the user oks or cancels the
>window
>> closes...
>>
>>
>> "Pep Gómez" <pep@impulso.net> wrote:
>> >Thank you Harish....
>> >What I have decided to do is to generate an RTF document, as MS
>suggests.
>> I
>> >have implemented kind of a "home made"parser, which detects the marks
I
>> >need on the RTF document, replace them with the data the costumer wants,
>> and
>> >so, I have an RTF document, with the data the user wants, and without
>having
>> >to "play" with Word from the server.
>> >Then, I send this RTF document to the client and that's it. But I keep
>> >having the same problem, I want to print this document on the client
>without
>> >him/her seeing the document itself (with some kind of button or whatever
>> >which triggers the printer dialog).
>> >So, Im stuck at this point :-(
>> >
>> >Thank you anyway, really :-)
>> >
>> >Pep
>> >pep@impulso.net
>> >
>> >"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
>> >news:3cdf802f$1@10.1.10.29...
>> >>
>> >> Pep,
>> >>
>> >> The requirement was -
>> >> One Department (Help Desk) wanted couple of MS Word reports to be
>> >generated
>> >> and printed. In that client's place, each Department had a separate
>> >printer
>> >> earmarked for them. So the document that was generated has to be
>printed
>> >> in this printer. All this has to happen without the document being
>> >displayed
>> >> in user's machine.
>> >>
>> >> The solution that I had implemented -
>> >> The document that was generated was huge in size. So I had quite a
few
>> >problems
>> >> like memory clogging up, performance, etc in our web server. Hence,
I
>> had
>> >> suggested some other possibilities like generating plain HTML reports,
>> PDF
>> >> etc. But the client was very particular in MS Word. After beefing up
>the
>> >> web server, I had set the Help Desk department printer as the default
>> >printer
>> >> in that web server. Once the document was generated, I trigerred the
>> >printing
>> >> of it directly from the web server itself. This still works fine for
>them.
>> >>
>> >> But my advise would be - instead of generating Word reports, if
>possible,
>> >> try to use some other means of generating report. MS Word is a white
>cow.
>> >> It eats up lots of processing power.
>> >>
>> >> Harish
>> >>
>> >> "Pep Gómez" <pep@impulso.net> wrote:
>> >> >Hi Harish.... and thank you for your response.
>> >> >Sorry but I don't understand the solution you are proposing... what
do
>> >you
>> >> >mean triggering the printing from the web server? Can you do that?
If
>> so,
>> >> >how?
>> >> >If the solution you are proposing is printing the document on the
>server
>> >> it
>> >> >wouldnt be useful in my case, but if what you are saying is triggering
>> >the
>> >> >printing on the client from the server, that would be great.
>> >> >
>> >> >Thank you
>> >> >
>> >> >Pep
>> >> >pep@impulso.net
>> >> >
>> >> >"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
>> >> >news:3cdbd830$1@10.1.10.29...
>> >> >>
>> >> >> Pep,
>> >> >>
>> >> >> I came acros the same requirement in one of my earlier projects.
>That
>> >> time
>> >> >> I could create the document in the web server and stream it to the
>> >> >client's
>> >> >> box. But I could not trigger the printing from client box. Hence
I
>> >> >triggered
>> >> >> printing directly from my web server itself. Is it not possible
for
>> you
>> >> to
>> >> >> trigger printing from yr web server instead?
>> >> >>
>> >> >> Harish
>> >> >>
>> >> >>
>> >> >> "Pep Gómez" <pep@ati.es> wrote:
>> >> >> >Hi everybody...
>> >> >> >I have an application where I have to send the client a Word
>document,
>> >> >but
>> >> >> I
>> >> >> >don't want him/her to see it, just to print it.
>> >> >> >I have made an ASP page where I have an IFRAME with width and
>height
>> >> 0.
>> >> >> The
>> >> >> >page informs the user that the document is ready and it has a
>button
>> >> to
>> >> >> be
>> >> >> >able to print it. But I can't get it to work
>> >> >> >At the "parent" page I have something like
>> >> >> >
>> >> >> >Function btnPrint_onClick()
>> >> >> > window.frames("id_ifrPrintableDoc").print
>> >> >> >End Function
>> >> >> >
>> >> >> >Where "id_ifrPrintableDoc" is the id of the IFRAME which contains
>> the
>> >> >Word
>> >> >> >doc downloaded. But it doesn't work... it just prints the parent
>ASP
>> >> >page.
>> >> >> >What am I doing wrong? Is it possible to do this? Is there any
>other
>> >> way
>> >> >> to
>> >> >> >do this?
>> >> >> >
>> >> >> >Thank you in advance... any hint will be very appreciated
>> >> >> >
>> >> >> >Pep
>> >> >> >pep@impulso.net
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >>
>> >
>> >
>>
>
>
-
Re: How to, automatically, print a doc on a client
Try giving focus to the IFRAME first using
window.frames("framePrintWindow").focus
"Pep Gómez" <pep@ati.es> wrote:
>Hi everybody...
>I have an application where I have to send the client a Word document, but
I
>don't want him/her to see it, just to print it.
>I have made an ASP page where I have an IFRAME with width and height 0.
The
>page informs the user that the document is ready and it has a button to
be
>able to print it. But I can't get it to work
>At the "parent" page I have something like
>
>Function btnPrint_onClick()
> window.frames("id_ifrPrintableDoc").print
>End Function
>
>Where "id_ifrPrintableDoc" is the id of the IFRAME which contains the Word
>doc downloaded. But it doesn't work... it just prints the parent ASP page.
>What am I doing wrong? Is it possible to do this? Is there any other way
to
>do this?
>
>Thank you in advance... any hint will be very appreciated
>
>Pep
>pep@impulso.net
>
>
>
-
Re: How to, automatically, print a doc on a client
Just one last question :-)
I can't hide th eprinter dialog, and I understand it is fair, but, can I
customize the printer dialog to, for example, don't let the client choose
the number of copies or don't let the client print to a file?
Thank you again
Pep
pep@impulso.net
"JS" <jakesmsu@hotmail.com> escribió en el mensaje
news:3ce15a33@10.1.10.29...
>
> You cant get them past the printer dialog box. Nothing will, it's there
for
> security.
>
> "Pep Gómez" <pep@impulso.net> wrote:
> >I see, but I don't see the difference between this code and triggering a
> >"window.print". If, with this code, I could hide the printer dialog, it
> >would be great (I also understand it would be kind of dangerous)... but
> I
> >have tried with "ExecWB 6,2", in the documentation, it says that the
second
> >parameter, with a 2, hides the dialog, but the dialog still appears.
> >
> >Pep
> >pep@impulso.net
> >
> >"JS" <jakesmsu@hotmail.com> escribió en el mensaje
> >news:3cdfd488$1@10.1.10.29...
> >>
> >> VIA WEB, you cannot trigger printing on a clients machine without them
> >knowing....imagine
> >> the security issue....every time you go to someones web page they send
> a
> >> document to thier printer...anyway I have a close example of how to do
> >it...
> >>
> >> <script language=VBScript><!-- //
> >> Sub VBPrint() On Error Resume Next
> >> WBControl.ExecWB 6,1
> >> End Sub
> >> //--></script>
> >>
> >> <script language=JavaScript><!-- //
> >> if (window.print)
> >> self.print();
> >> else if (navigator.appName.indexOf('Microsoft') !=-1)
> >> VBPrint()
> >> setTimeout('self.close()',3000);
> >> //--></script>
> >>
> >> I use this by opening a window target=_blank with the previous Jscript
> in
> >> it...it opens the print dialog and after the user oks or cancels the
> >window
> >> closes...
> >>
> >>
> >> "Pep Gómez" <pep@impulso.net> wrote:
> >> >Thank you Harish....
> >> >What I have decided to do is to generate an RTF document, as MS
> >suggests.
> >> I
> >> >have implemented kind of a "home made"parser, which detects the marks
> I
> >> >need on the RTF document, replace them with the data the costumer
wants,
> >> and
> >> >so, I have an RTF document, with the data the user wants, and without
> >having
> >> >to "play" with Word from the server.
> >> >Then, I send this RTF document to the client and that's it. But I keep
> >> >having the same problem, I want to print this document on the client
> >without
> >> >him/her seeing the document itself (with some kind of button or
whatever
> >> >which triggers the printer dialog).
> >> >So, Im stuck at this point :-(
> >> >
> >> >Thank you anyway, really :-)
> >> >
> >> >Pep
> >> >pep@impulso.net
> >> >
> >> >"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
> >> >news:3cdf802f$1@10.1.10.29...
> >> >>
> >> >> Pep,
> >> >>
> >> >> The requirement was -
> >> >> One Department (Help Desk) wanted couple of MS Word reports to be
> >> >generated
> >> >> and printed. In that client's place, each Department had a separate
> >> >printer
> >> >> earmarked for them. So the document that was generated has to be
> >printed
> >> >> in this printer. All this has to happen without the document being
> >> >displayed
> >> >> in user's machine.
> >> >>
> >> >> The solution that I had implemented -
> >> >> The document that was generated was huge in size. So I had quite a
> few
> >> >problems
> >> >> like memory clogging up, performance, etc in our web server. Hence,
> I
> >> had
> >> >> suggested some other possibilities like generating plain HTML
reports,
> >> PDF
> >> >> etc. But the client was very particular in MS Word. After beefing up
> >the
> >> >> web server, I had set the Help Desk department printer as the
default
> >> >printer
> >> >> in that web server. Once the document was generated, I trigerred the
> >> >printing
> >> >> of it directly from the web server itself. This still works fine for
> >them.
> >> >>
> >> >> But my advise would be - instead of generating Word reports, if
> >possible,
> >> >> try to use some other means of generating report. MS Word is a white
> >cow.
> >> >> It eats up lots of processing power.
> >> >>
> >> >> Harish
> >> >>
> >> >> "Pep Gómez" <pep@impulso.net> wrote:
> >> >> >Hi Harish.... and thank you for your response.
> >> >> >Sorry but I don't understand the solution you are proposing... what
> do
> >> >you
> >> >> >mean triggering the printing from the web server? Can you do that?
> If
> >> so,
> >> >> >how?
> >> >> >If the solution you are proposing is printing the document on the
> >server
> >> >> it
> >> >> >wouldnt be useful in my case, but if what you are saying is
triggering
> >> >the
> >> >> >printing on the client from the server, that would be great.
> >> >> >
> >> >> >Thank you
> >> >> >
> >> >> >Pep
> >> >> >pep@impulso.net
> >> >> >
> >> >> >"Harish Kumar" <HarishM@MailCity.Com> escribió en el mensaje
> >> >> >news:3cdbd830$1@10.1.10.29...
> >> >> >>
> >> >> >> Pep,
> >> >> >>
> >> >> >> I came acros the same requirement in one of my earlier projects.
> >That
> >> >> time
> >> >> >> I could create the document in the web server and stream it to
the
> >> >> >client's
> >> >> >> box. But I could not trigger the printing from client box. Hence
> I
> >> >> >triggered
> >> >> >> printing directly from my web server itself. Is it not possible
> for
> >> you
> >> >> to
> >> >> >> trigger printing from yr web server instead?
> >> >> >>
> >> >> >> Harish
> >> >> >>
> >> >> >>
> >> >> >> "Pep Gómez" <pep@ati.es> wrote:
> >> >> >> >Hi everybody...
> >> >> >> >I have an application where I have to send the client a Word
> >document,
> >> >> >but
> >> >> >> I
> >> >> >> >don't want him/her to see it, just to print it.
> >> >> >> >I have made an ASP page where I have an IFRAME with width and
> >height
> >> >> 0.
> >> >> >> The
> >> >> >> >page informs the user that the document is ready and it has a
> >button
> >> >> to
> >> >> >> be
> >> >> >> >able to print it. But I can't get it to work
> >> >> >> >At the "parent" page I have something like
> >> >> >> >
> >> >> >> >Function btnPrint_onClick()
> >> >> >> > window.frames("id_ifrPrintableDoc").print
> >> >> >> >End Function
> >> >> >> >
> >> >> >> >Where "id_ifrPrintableDoc" is the id of the IFRAME which
contains
> >> the
> >> >> >Word
> >> >> >> >doc downloaded. But it doesn't work... it just prints the parent
> >ASP
> >> >> >page.
> >> >> >> >What am I doing wrong? Is it possible to do this? Is there any
> >other
> >> >> way
> >> >> >> to
> >> >> >> >do this?
> >> >> >> >
> >> >> >> >Thank you in advance... any hint will be very appreciated
> >> >> >> >
> >> >> >> >Pep
> >> >> >> >pep@impulso.net
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >
> >> >
> >>
> >
> >
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|