<p>I've generated a pdf using iTextSharp and I can preview it very well in ASP.Net but I need to send it directly to printer without a preview. I want the user to click the print button and automatically the document prints.</p>

<p>I know that a page can be sent directly to printer using the javascript window.print() but I don't know how to make it for a PDF.</p>

<p>Edit: it is not embedded, I generate it like this;</p>

<pre><code>                ...
                FileStream stream = new FileStream(Request.PhysicalApplicationPath + "~1.pdf", FileMode.Create);
                Document pdf = new Document(PageSize.LETTER);
                PdfWriter writer = PdfWriter.GetInstance(pdf, stream);
                pdf.Open();
                pdf.Add(new Paragraph(member.ToString()));
                pdf.Close();

                Response.Redirect("~1.pdf");
                ...
</code></pre>

<p>And here I am.</p>

Is the pdf embedded in the page with embedd-tag or just opened in a frame or how are you showing it?
If its embedded, just make sure that the object is selected and then do a print().
Get the ref to the embedded document.
```
```
var x = document.getElementById("mypdfembeddobject");  
x.click();
x.setActive();
x.focus();
x.print();
```
```