Pdf Duo .Net component
Shows the PDF in the Browser Window without saving it on the disk.

Namespace: DuoDimension
Assembly: pdfduo-net (in pdfduo-net.dll) Version: 2.4.0.0 (2.4)

Syntax

         
 C#  Visual Basic  Visual C++ 
public void ShowPDF(
	byte[] PdfAsBytes,
	HttpResponse Response
)
Public Sub ShowPDF ( _
	PdfAsBytes As Byte(), _
	Response As HttpResponse _
)
public:
void ShowPDF(
	array<unsigned char>^ PdfAsBytes, 
	HttpResponse^ Response
)

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

CopyC#
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