Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class HttpReadType

    Show / Hide Table of Contents

    Class HttpReadType

    Specifies the different way of presenting the document at the client browser.

    Inheritance
    System.Object
    HttpReadType
    Namespace: Syncfusion.Pdf
    Assembly: Syncfusion.Pdf.Portable.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 Description
    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 Description
    HttpReadType

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32

    See Also

    PdfDocument
    PdfPage
    PdfBitmap
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved