Description
Assembly: pdfduo-net (in pdfduo-net.dll)
Version: 2.4.0.0 (2.4)
CopyC#
Shows the PDF in the Browser Window without saving it on the disk.
Namespace:
DuoDimensionAssembly: pdfduo-net (in pdfduo-net.dll)
Version: 2.4.0.0 (2.4)
Syntax
| C# | Visual Basic |
public void ShowPDF( byte[] PdfAsBytes, HttpResponse Response )
Public Sub ShowPDF ( _ PdfAsBytes As Byte(), _ Response As HttpResponse _ )
Parameters
- PdfAsBytes
- array<
Byte
>[]()[]
The Pdf document represented as array of bytes.
- Response
- HttpResponse
The HttpResponse object to put the PDF to. (For example, the HttpResponse object associated with the System.Web.UI.Page as property Response).
Examples
DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf(); conv.BasePath = MapPath(@"~\"); // put image to the website root conv.OpenHTML(@"<div align="right"><img src="logo.jpg" width="200" height="150" /></div>"); conv.ShowPDF(conv.SavePDF(), Response); // show resulting PDF on the screen conv.SavePDF(MapPath(@"~\") + "test.pdf"); // or you can save file to server root
See Also
HtmlToPdf Class
DuoDimension Namespace