生成

Generate(Stream, GlobalPageSettings, ImageCollection, Encoding)

创建一个GenerationResult,其中包含基于标记流的模板 (.omr) 和模板图像。

public GenerationResult Generate(Stream markupStream, GlobalPageSettings settings = null, 
    ImageCollection collection = null, Encoding encoding = null)
参数Type描述
markupStreamStream可读取的流,包含用于模板配置(txt 或 json)的标记行
settings全局页面设置在所有页面的模板生成中使用的全局设置
collectionImageCollection可用于模板生成的图像集合。允许使用来自 MemoryStream 的图像,而不是文件系统中的图像。
编码编码标记行的编码,默认使用 UTF-8

返回值

生成结果

异常

异常条件
ArgumentNullExceptionmarkupPath
RuntimeExceptionOMR模板生成

另请参阅


Generate(string, GlobalPageSettings, string[], Encoding)

创建一个GenerationResult,其中包含基于指定路径存储的标记内容的模板 (.omr) 和模板图像。

public GenerationResult Generate(string markupPath, GlobalPageSettings settings = null, 
    string[] imagesPaths = null, Encoding encoding = null)
参数Type描述
markupPathString指向包含模板配置(txt 或 json)标记行的文件的路径
settings全局页面设置在所有页面的模板生成中使用的全局设置
imagesPathsString[]用于模板生成的图像路径
编码编码标记行的编码,默认使用 UTF-8

返回值

生成结果

异常

异常条件
ArgumentNullExceptionmarkupPath
FileNotFoundExceptionmarkupPath
RuntimeExceptionOMR模板生成

另请参阅


Generate(string[], GlobalPageSettings, ImageCollection)

创建一个 GenerationResult,其中包含基于标记内容的模板(.omr)和模板图像

public GenerationResult Generate(string[] markupContent, GlobalPageSettings settings = null, 
    ImageCollection collection = null)
参数Type描述
markupContentString[]用于模板配置的标记行集合(txt 或 json)
settings全局页面设置在所有页面的模板生成中使用的全局设置
collectionImageCollection可用于模板生成的图像集合。允许使用来自 MemoryStream 的图像,而不是文件系统中的图像。

返回值

生成结果

异常

异常条件
ArgumentNullException
RuntimeExceptionOMR模板生成

另请参阅


Generate(TemplateConfig, GlobalPageSettings, ImageCollection)

创建一个 GenerationResult,其中包含基于标记内容的模板(.omr)和模板图像

public GenerationResult Generate(TemplateConfig config, GlobalPageSettings settings = null, 
    ImageCollection collection = null)
参数Type描述
config模板配置模板配置,
settings全局页面设置在所有页面的模板生成中使用的全局设置
collectionImageCollection可用于模板生成的图像集合。允许使用来自 MemoryStream 的图像,而不是文件系统中的图像。

返回值

生成结果

异常

异常条件
RuntimeExceptionOMR模板生成

另请参阅