private static string GetExtension(DocumentConverterPreferences preferences) { if (preferences.DocumentFormat != DocumentFormat.User) { return(DocumentWriter.GetFormatFileExtension(preferences.DocumentFormat)); } else { return(RasterCodecs.GetExtension(preferences.RasterImageFormat)); } }