Class HttpReadType
Specifies the different way of presenting the document at the client browser.
Inheritance
System.Object
HttpReadType
Namespace: Syncfusion.Pdf
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public sealed class HttpReadType : Enum
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
Open
Send the generated document to the client browser and will open document inside browser or using application associated with .pdf extension externally.
Declaration
public const HttpReadType Open
Field Value
Type |
---|
HttpReadType |
Save
Send the generated document to the client browser and presents an option to save the document to disk or open inside the browser.
Declaration
public const HttpReadType Save
Field Value
Type |
---|
HttpReadType |