Spire.PDFViewer is a powerful PDF Viewer component for .NET. It allows developers to load PDF document from stream, file and byte array.

Fri Jun 01, 2018 6:44 am

Dear margerie,

Thanks for your inquiry.
Our Spire.PDFViewer for ASP.NET doesn't support downloading and printing pdf, so there is no need to restrict them, you could have a try. If I misunderstanding your requirement, please describe it in detail and write back to us.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Jun 08, 2018 9:16 am

Dear margerie,

Greetings from E-iceblue.
How is your issue going now ? Could you please give us some feedback at your convenience ?

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Dec 25, 2018 9:28 am

Hi Team,

I need assistance.

I want to show the print button after user have submitted the form data to SQL Server. the content of the PDF file will be the session data or form data that was submitted.

Please assist with a sample .aspx and .aspx.cs script to achieve this.

Thanks.

remonking4cool@gmail.com
 
Posts: 2
Joined: Tue Dec 25, 2018 8:40 am

Tue Dec 25, 2018 10:05 am

Hi remonking4cool@gmail.com,

Thanks for your inquiry.
Our Spire.PDFViewer for ASP.NET doesn't support printing PDF file. Yet our Spire.PDF supports loading PDF via stream and printing PDF, which might meet your requirement. Here is a demo for your kind reference.
http://www.e-iceblue.com/downloads/demo/15969Demo.zip
If this doesn't meet your requirement, please share more details for further investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Wed Dec 26, 2018 3:54 pm

Thank you for your feedback and the attached sample project/code.

However, the problem here is how to move or export my session data or retrieve data from database to the \Sample.pdf within the below class. Please assist.



public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}

protected void Button1_Click(object sender, EventArgs e)
{
//get PDF data, might you need to change this code accroding to your specific situation.
byte[] FileData = File.ReadAllBytes(Server.MapPath(@"~\Sample.pdf"));
MemoryStream stream = new MemoryStream(FileData);
//load Pdf from stream
PdfDocument pdf = new PdfDocument(stream);

//pdf.PrintSettings.PrinterName = ""; set your printer name
//pdf.PrintSettings.PrintController = new StandardPrintController(); Print Silently


//print pdf, it will print with default printer if you don't set printer name
pdf.Print();
}
}

remonking4cool@gmail.com
 
Posts: 2
Joined: Tue Dec 25, 2018 8:40 am

Thu Dec 27, 2018 2:40 am

Hi remonking4cool@gmail.com,

Thanks for your information.
You could refer to following link:
https://www.c-sharpcorner.com/UploadFil ... d-C-Sharp/

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.PDFViewer