------=_NextPart_000_00D3_01C44C9C.5D196110
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Ok,
server printing :
The csp page cannot open the printer port so you have to create a new
process on the server that will do that.
The way I would suggest is as follows :
when your user hits the print button you invoke some javascript
that calls a server method with all the parameters you need.
Inside your method you have to use the job command which
will create a new server process. That new process (a mac routine =
really)
can open the port and do the printing for you.
(Look in cache object script reference for the syntax you need=20
to pass the parameters to the job command.)
If you want to check whether it finished you have to communicate
with the method that invoked the job via the disk, ie by updating
an object or simply by having the jobbed process to set up some global =
reference
that the method keeps checking within a loop.
I dont know if you need to check whether the printing completed, if you =
do
then we may speak a bit more on that (if you did not fully understand =
the
communication via the disk).
Client printing :
Here the only way is to create an html page preformatted for your =
pre-printed
stationary. We normally use <pre> </pre> tags to honour the spaces and =
the
line feeds you need.
The onLoad of that page should say onload=3D'window.print();' so the =
printing
dialogue comes up for the user to hit enter.
Hope I helped you a bit
Regards from Athens
Paris
"Muthu" <[EMAIL PROTECTED]> wrote in message =
news:[EMAIL PROTECTED]
Hi Paris Marinakis,
Printer which is connected in the server itself.=20
Is it possible to fetch the Client Printer , If so please tell me that =
soluion too.
Thanks
Muthu Rajan
"Paris Marinakis" <[EMAIL PROTECTED]> wrote in message =
news:[EMAIL PROTECTED]
are you trying to print on a printer that is connected to the server
or to the client ?
This is a very important question :)
Paris
"Muthu" <[EMAIL PROTECTED]> wrote in message =
news:[EMAIL PROTECTED]
Hi Paris Marinakis,
I have to print the values in the Pre-Printed stationery.
For that only i have opened the Printer and using the Open =
|PRN|Printerpath method.
Is there anyother way to acheive this ?
Please help me.
Thanks
Muthu Rajan
"Paris Marinakis" <[EMAIL PROTECTED]> wrote in message =
news:[EMAIL PROTECTED]
Hi,
You cannot print to a device from a csp page. You cannot open =
files
access the disk etc because that compromises internet
explorer security.
Imagine if an internet page you accessed could open ports
on your pc, or read/write files etc....
So printing from a csp page (same as an html for that purpose)
can only happen by isuing a javascript command window.print()
which would print the contents of the page after the user =
selects
a printer interactively
What are you trying to print ?
On which computer is that port you try to open ?
On the client pc or on the server ?
Regards
Paris
"Muthu" <[EMAIL PROTECTED]> wrote in message =
news:[EMAIL PROTECTED]
Hi All, =20
I have faced a problem in printing from the CSP page.
I have written a routine to print a report using the =
following statements.
set new=3D"|PRN|\\printerpath
open new::5
use new
w "This is a Test Print"
close new
This routine is working fine through terminal window.but when =
i invoked this routine from the CSP page using #Server method, it throws =
the following error.
"Http request failed, unable to process hyperevents."
Could anyone please help me.
Thanks
Muthu Rajan
------=_NextPart_000_00D3_01C44C9C.5D196110
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Ok,</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>server printing :</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>The csp page cannot open the printer port so you =
have to=20
create a new</FONT></DIV>
<DIV><FONT size=3D2>process on the server that will do =
that.</FONT></DIV>
<DIV><FONT size=3D2>The way I would suggest is as follows :</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>when your user hits the print button you invoke some =
javascript</FONT></DIV>
<DIV><FONT size=3D2>that calls a server method with all the parameters =
you=20
need.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Inside your method you have to use the =
<STRONG>job</STRONG>=20
command which</FONT></DIV>
<DIV><FONT size=3D2>will create a new server process. That new process =
(a mac=20
routine really)</FONT></DIV>
<DIV><FONT size=3D2>can open the port </FONT><FONT size=3D2>and do the =
printing for=20
you.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>(Look in cache object script reference </FONT><FONT =
size=3D2>for=20
the syntax you need </FONT></DIV>
<DIV><FONT size=3D2>to pass the parameters to the job =
command.)</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>If you want to check whether it finished you have to =
communicate</FONT></DIV>
<DIV><FONT size=3D2>with the method that invoked the job via the disk, =
ie by=20
updating</FONT></DIV>
<DIV><FONT size=3D2>an object or simply by having the jobbed process to =
set up=20
some global reference</FONT></DIV>
<DIV><FONT size=3D2>that the method keeps checking within a =
loop.</FONT></DIV>
<DIV><FONT size=3D2>I dont know if you need to check whether the =
printing=20
completed, if you do</FONT></DIV>
<DIV><FONT size=3D2>then we may speak a bit more on that (if you did not =
fully=20
understand the</FONT></DIV>
<DIV><FONT size=3D2>communication via the disk).</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Client printing :</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Here the only way is to create an html page =
preformatted for=20
your pre-printed</FONT></DIV>
<DIV><FONT size=3D2>stationary. We normally use <pre> </pre> =
tags to=20
honour the spaces and the</FONT></DIV>
<DIV><FONT size=3D2>line feeds you need.</FONT></DIV>
<DIV><FONT size=3D2>The onLoad of that page should say =
onload=3D'window.print();' so=20
the printing</FONT></DIV>
<DIV><FONT size=3D2>dialogue comes up for the user to hit =
enter.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Hope I helped you a bit</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Regards from Athens</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Paris</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Muthu" <<A=20
=
href=3D"mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A>>=
wrote=20
in message <A=20
=
href=3D"news:[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
m</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>Hi <FONT face=3D"Times New Roman" =
size=3D3>Paris=20
Marinakis,</FONT></FONT></DIV>
<DIV><FONT face=3D"Times New Roman" size=3D3></FONT> </DIV>
<DIV><FONT face=3D"Times New Roman" size=3D3>Printer which is =
connected in the=20
server itself. </FONT></DIV>
<DIV><FONT face=3D"Times New Roman" size=3D3>Is it possible to fetch =
the Client=20
Printer , If so please tell me that soluion too.</FONT></DIV>
<DIV><FONT face=3D"Times New Roman" size=3D3></FONT> </DIV>
<DIV><FONT face=3D"Times New Roman" size=3D3>Thanks</FONT></DIV>
<DIV><FONT face=3D"Times New Roman" size=3D3>Muthu =
Rajan</FONT></DIV></FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Paris Marinakis" <<A=20
href=3D"mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A>> wrote in =
message <A=20
=
href=3D"news:[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
m</A>...</DIV>
<DIV><FONT size=3D2>are you trying to print on a printer that is =
connected to=20
the server</FONT></DIV>
<DIV><FONT size=3D2>or to the client ?</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>This is a very important question =
:)</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Paris</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Muthu" <<A=20
=
href=3D"mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A>>=
=20
wrote in message <A=20
=
href=3D"news:[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
m</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi <FONT face=3D"Times New Roman" =
size=3D3>Paris=20
Marinakis,</FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I have to print the values in the =
Pre-Printed=20
stationery.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>For that only i have opened the =
Printer and=20
using the Open |PRN|Printerpath method.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Is there anyother way to acheive =
this=20
?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Please help me.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Muthu Rajan</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Paris Marinakis" <<A=20
href=3D"mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A>> wrote =
in message=20
<A=20
=
href=3D"news:[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
m</A>...</DIV>
<DIV><FONT size=3D2>Hi,</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>You cannot print to a device from a csp =
page. You=20
cannot open files</FONT></DIV>
<DIV><FONT size=3D2>access the disk etc because that compromises =
internet</FONT></DIV>
<DIV><FONT size=3D2>explorer security.</FONT></DIV>
<DIV><FONT size=3D2>Imagine if an internet page you accessed =
could open=20
ports</FONT></DIV>
<DIV><FONT size=3D2>on your pc, or read/write files =
etc....</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>So printing from a csp page (same as =
an html for=20
that purpose)</FONT></DIV>
<DIV><FONT size=3D2>can only happen by isuing a javascript =
command=20
window.print()</FONT></DIV>
<DIV><FONT size=3D2>which would print the contents of the page =
after the=20
user selects</FONT></DIV>
<DIV><FONT size=3D2>a printer interactively</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>What are you trying to print ?</FONT></DIV>
<DIV><FONT size=3D2>On which computer is that port you try to =
open=20
?</FONT></DIV>
<DIV><FONT size=3D2>On the client pc or on the server =
?</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Regards</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>Paris</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: =
5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Muthu" <<A=20
=
href=3D"mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</A>>=
=20
wrote in message <A=20
=
href=3D"news:[EMAIL PROTECTED]">news:[EMAIL PROTECTED]
m</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>Hi All, =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have faced a problem in =
printing from=20
the CSP page.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I have written a routine to =
print a=20
report using the following statements.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><STRONG> =
set=20
new=3D"|PRN|\\printerpath</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG> =
open=20
new::5</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG> =
use=20
new<BR> w "This is a Test=20
Print"<BR> close =
new</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This routine is working fine =
through=20
terminal window.but when i invoked this routine from the CSP =
page=20
using #Server method, it throws the following =
error.</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2><STRONG></STRONG></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>"Http request failed, =
unable to=20
process hyperevents."</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Could anyone please help =
me.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Muthu=20
=
Rajan</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></B=
LOCKQUOTE></BODY></HTML>
------=_NextPart_000_00D3_01C44C9C.5D196110--