Xamarin.iOS Documentation | ComponentOne
Controls / FlexViewer / Features / Export
In This Topic
    Export
    In This Topic

    FlexViewer allows you to export a PDF document and save it to a file, stream or as an image(s). You can use Save method of the FlexViewer class to save a PDF document to a file or a stream. In addition, you can use various methods provided by the FlexViewer class to save a PDF document as an image. These methods are listed in the following table:

    Methods Description
    SaveAsBmp Saves the document pages as images in BMP format, i.e., one image for each page.
    SaveAsGif Saves the document pages as images in GIF format, i.e., one image for each page.
    SaveAsJpeg Saves the document pages as images in JPEG format, i.e., one image for each page.
    SaveAsPng Saves the document pages as images in PNG format, i.e., one image for each page.
    SaveAsTiff Saves the document pages as images in TIFF format, i.e., one image for each frame.

    The following code illustrates how to export PDF pages to images. This example uses the sample code created in Quick Start section.

    C#
    Copy Code
    string fullPath = null;
    fullPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ExportedPdf" + "{0}") + "." + "PNG";
    flexViewer.SaveAsPng(fullPath);