| re: Print Pdf directly (without preview) from client side (using asp.net)
you can not directly print a pdf file in a browser, nor can you include
javascript. when the browser detects a pdf file, it looks an activex control
assigned to the mime type, in this case adobe reader. it then loads adobe
reader active/x control, and gives the control the url. the reader control
then requests and downloads the content (if you have ie 6.0 with service
packs, the download will come from the cache, otherwise the pdf is
downloaded again) and renders it.
-- bruce (sqlwork.com)
"AP No spam" <ales_pac@lycos.it> wrote in message
news:fbad1b13.0407220654.3483adac@posting.google.c om...[color=blue]
> Hi
>
> I need help to Print Pdf File directly
> without preview from client side
>
> To solve problem I used
>
> This C# code
>
> Response.Buffer = true;
> Response.ClearContent();
> Response.ClearHeaders();
> Response.Cache.SetCacheability(HttpCacheability.No Cache);
> Response.ContentType = "application/pdf";
> Response.BinaryWrite(memStream.ToArray());
> Response.End();
>
> and how you can see
>
> I Clean response and Use BinaryWrite
>
> so I don't know how to insert this html code
>
> <script language="javascript">
> window.print();
> </script>
>
>
> I tried also with frameset (don't work)
> and I tried also
>
> with
>
> <script language="javascript">
> var oWnd = window.open("TestPrint.Aspx", "tstPrint");
> oWnd.print();
> </script>
>
> it shows message "file TestPrint.Aspx not found".
>
>
> Can you help me????
>
> Thanks in advance!!!
>
> Bye bye[/color] |