This document is archived and information here might be outdated.  Recommended version.


How to set the picture symbol vectorization settings for vector exports (ArcObjects .NET 10.5 SDK)

How to set the picture symbol vectorization settings for vector exports


Summary
This topic shows how to use the IExportVectorOptionsEx interface to choose whether bitmap marker symbols and bitmap fills will be rasterized or vectorized during output.

Setting the picture symbol vectorization settings for vector exports

To access the picture symbol vectorization settings, use the IExportVectorOptionsEx interface. IExportVectorOptionsEx can be cast onto an IExport object to set the ExportPictureSymbolOptions property. The following table shows the possible values:
Constant
Value
Description
esriPSORasterize
0
Rasterizes layers with picture symbols (the default).
esriPSORasterizeIfRasterData
1
Rasterizes layers with picture symbols only if the symbols have raster data.
esriPSOVectorize
2
Vectorizes layers with picture symbols.
Follow these steps to set the picture symbol vectorization settings:
  1. Initialize an IExport object called docExport for the desired type of export.
  2. Use the following lines of code to initialize the IExport object's vectorization settings:
[C#]
if (docExport is IExportVector)
{
    // Assign the IExportVectorOptionsEx property to control the rendering of picture marker symbols.
    docExportVectorOptionsEx=docExport as IExportVectorOptionsEx;
    docExportVectorOptionsEx.ExportPictureSymbolOptions =
        esriPictureSymbolOptions.esriPSOVectorize;
}
[VB.NET]
If TypeOf docExport Is IExportVector Then
    ' Assign the IExportVectorOptionsEx property to control the rendering of picture marker symbols.
    docExportVectorOptionsEx=docExport
    docExportVectorOptionsEx.ExportPictureSymbolOptions=esriPictureSymbolOptions.esriPSOVectorize
End If
This code is only valid for vector export types, such as Enhanced Metafile (EMF), Encapsulated PostScript (EPS), Portable Document Format (PDF), and Adobe Illustrator (AI). Attempting to cast IExportVectorOptionsEx to a non-vector IExport object will result in an invalid cast error.






To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced
Engine Developer Kit Engine