SvgExtractor.Extract

Extract(GraphicsAbsorber, Predicate<GraphicElement>, Page)

Exracts svg image to string from graphic elements represents by !:absorber with a predicate filter.

public string Extract(GraphicsAbsorber absorber, Predicate<GraphicElement> filter, Page page)
ParameterTypeDescription
absorberGraphicsAbsorberThe GraphicsAbsorber object that contains the graphic elements.
filterPredicate`1A predicate function used to filter the graphic elements.
pagePageThe page where the absorber gets graphic elements.

Return Value

The string with SVG content.

Exceptions

exceptioncondition
PdfExceptionIf an error occurred when converting to SVG.

See Also


Extract(GraphicsAbsorber, Predicate<GraphicElement>, Page, string)

Exracts svg image to file from graphic elements represents by !:absorber with a predicate filter.

public void Extract(GraphicsAbsorber absorber, Predicate<GraphicElement> filter, Page page, 
    string svgFilePath)
ParameterTypeDescription
absorberGraphicsAbsorberThe GraphicsAbsorber object that contains the graphic elements.
filterPredicate`1A predicate function used to filter the graphic elements.
pagePageThe page where the absorber gets graphic elements.
svgFilePathStringThe target SVG file path.

Exceptions

exceptioncondition
PdfExceptionIf an error occurred when converting to SVG.

See Also


Extract(IEnumerable<GraphicElement>, Page)

Extracts graphic elements into a SVG string. Options ignored - grouping, extracting from rectangle

public string Extract(IEnumerable<GraphicElement> elements, Page page)
ParameterTypeDescription
elementsIEnumerable`1The graphic elements to convert.
pagePageThe page where the absorber gets graphic elements.

Return Value

The string with SVG content.

Exceptions

exceptioncondition
PdfExceptionIf an error occurred when converting to SVG.

See Also


Extract(IEnumerable<GraphicElement>, Page, string)

Extracts graphic elements into a single SVG file. Options ignored - grouping, extracting from rectangle

public void Extract(IEnumerable<GraphicElement> elements, Page page, string svgFilePath)
ParameterTypeDescription
elementsIEnumerable`1The graphic elements to convert.
pagePageThe page where the absorber gets graphic elements.
svgFilePathStringThe target SVG file path.

Exceptions

exceptioncondition
PdfExceptionIf an error occurred when converting to SVG.

See Also


Extract(Page)

Extracts Svg images from a page to strings.

public List<string> Extract(Page page)
ParameterTypeDescription
pagePageThe page to extract.

Return Value

The list of SVG content strings.

Exceptions

exceptioncondition
PdfExceptionIf an error occurred when converting to SVG.

See Also


Extract(Page, string)

Extracts Svg images from a page to files.

public void Extract(Page page, string directory)
ParameterTypeDescription
pagePageThe page to extract.
directoryStringThe target directory to place SVG images.

Exceptions

exceptioncondition
PdfExceptionIf an error occurred when converting to SVG.

See Also