Enum HttpReadType
Specifies the different way of presenting the document at the client browser.
Namespace: Syncfusion.Pdf
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public enum HttpReadType
Remarks
To know more about using HttpReadType refer this link.
Examples
//Create a new document.
PdfDocument doc = new PdfDocument();
//Add a page in the PDF document.
PdfPage page = doc.Pages.Add();
//Load an existing image.
PdfBitmap bmp = new PdfBitmap("Logo.png");
//Draw the image in PDF page.
page.Graphics.DrawImage(bmp, 20, 20, 100, 200);
//Open the document in browser after saving it.
doc.Save("Sample.pdf", Response, HttpReadType.Open);
'Create a new document.
Dim doc As PdfDocument = New PdfDocument()
'Add a page in the PDF document.
Dim page As PdfPage = doc.Pages.Add()
'Load an existing image.
Dim bmp As PdfBitmap = New PdfBitmap("Logo.png")
'Draw the image in PDF page.
page.Graphics.DrawImage(bmp, 20, 20, 100, 200)
'Open the document in browser after saving it.
doc.Save("Sample.pdf", Response, HttpReadType.Open)
Fields
Name | Description |
---|---|
Open | Send the generated document to the client browser and will open document inside browser or using application associated with .pdf extension externally. |
Save | Send the generated document to the client browser and presents an option to save the document to disk or open inside the browser. |