Enum HttpReadType
- Namespace
- Syncfusion.Pdf
- Assembly
- Syncfusion.Pdf.Portable.dll
Specifies the different way of presenting the document at the client browser.
public enum HttpReadType
Fields
Open = 0
Send the generated document to the client browser and will open document inside browser or using application associated with .pdf extension externally.
Save = 1
Send the generated document to the client browser and presents an option to save the document to disk or open inside the browser.
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)
Remarks
To know more about using HttpReadType refer this link.