public void Export( ExportFormat exportFormat )
Public Overloads Sub Export( _ ByVal exportFormat As ExportFormat _ )
Parameters
- exportFormat
- ExportFormat
public void Export( ExportFormat exportFormat )
Public Overloads Sub Export( _ ByVal exportFormat As ExportFormat _ )
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method must be called within the lambda passed to QueuedTask.Run. |
This overload is intended to export a single page layout to a supported output file format. Even if a map series is present, if this overload is chosen, the current layout page will be exported to file.
Each ExportFormat has its own set of configurable set of parameters such as OutputFileName and Resolution. You must first create the export format and then provide that as the only required input parameter.
//Export a single page layout to PDF. //Create a PDF format with appropriate settings //BMP, EMF, EPS, GIF, JPEG, PNG, SVG, TGA, and TFF formats are also available for export PDFFormat PDF = new PDFFormat() { OutputFileName = filePath, Resolution = 300, DoCompressVectorGraphics = true, DoEmbedFonts = true, HasGeoRefInfo = true, ImageCompression = ImageCompression.Adaptive, ImageQuality = ImageQuality.Best, LayersAndAttributes = LayersAndAttributes.LayersAndAttributes }; //Check to see if the path is valid and export if (PDF.ValidateOutputFilePath()) { await QueuedTask.Run(() => layout.Export(PDF)); //Export the layout to PDF on the worker thread }
Target Platforms: Windows 10, Windows 8.1