Hi I have a pdf file and I want to see printdialog when client users click the document.
I use the following code
FileStream
fs = new FileStream(su.MapPath("../../QDMSFiles/TEMPFOL/") + tempFileName, System.IO.FileMode.Open);
Byte[] buffer = new Byte[fs.Length];
fs.Read(buffer, 0, (
int)fs.Length);
PdfContentEditor
contentEditor = new PdfContentEditor();
contentEditor.BindPdf(fs);
System.Drawing.
Rectangle rectangle = new System.Drawing.Rectangle(100, 100, 200, 200);
contentEditor.CreateJavaScriptLink(
"this.print({bUI:true,bSilent:false,bShrinkToFit:true});", new System.Drawing.Rectangle(0, 0, 100, 100), 1, System.Drawing.Color.Red);// save updated PDF document
contentEditor.Save(
"c:/test2.pdf");
But printdialog appears when I click rectangle I want to see print dialog when pdf load