Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.4.3
|
Leadtools.Documents Namespace > DocumentImages Class : IsSvgSupported Property |
public virtual bool IsSvgSupported {get;}
'Declaration
Public Overridable ReadOnly Property IsSvgSupported As Boolean
'Usage
Dim instance As DocumentImages Dim value As Boolean value = instance.IsSvgSupported
public boolean isSvgSupported()
Use IsSvgSupported to determine whether an SVG (Scalable Vector Graphics) representation of a page can be obtained through DocumentPage.GetSvg. If IsSvgSupported is true, then the method will return an SVG document ready to be used. If IsSvgSupported is false, the method will return null.
The DocumentPage.GetText method is used to parse the text from a page within the document. Document uses IsSvgSupported to determine how this method works as follows:
If IsSvgSupported is true, then DocumentPage.GetSvg is called internally and the text is parsed from the SVG document directly. OCR is not used.
If IsSvgSupported is false, then DocumentPage.GetImage is called instead and the text is parsed using the OCR engine instance set in DocumentPageText.OcrEngine. SVG is not used
You can override this behavior using the DocumentText.TextExtractionMode property.
The framework uses similar logic to RasterCodecs.CanLoadSvg to determine SVG support. Currently, these support is provided by these types of documents:
All document formats supported by LEADTOOLS. This includes the likes of Microsoft Office formats (DOCX/DOC, XLSX/XLS, PPTX/PPT), HTML, Text, RTF, IOCA/MODCA, ePub and many more. Any format that returns true for the value of CodecsImageInfo.Document.IsDocumentFile. The value of IsSvgViewingPreferred will be true as well.
Vector file formats such DXF, DWG, DWF. Any format that returns true for the value of CodecsImageInfo.Vector.IsVectorFile. The value of IsSvgViewingPreferred will be true as well.
SVG files naturally. The value of IsSvgViewingPreferred will be true as well.
Acrobat PDF document using PDFDocument.GetContentType and IsSvgSupported will be determined if the document has any text data that can be parsed:
If the return value is PDFContentType.Text, then the PDF document is "searchable" that contain any type of data and IsSvgSupported will be true and the value of IsSvgViewingPreferred will be set to true as well.
If the return value is PDFContentType.ImageOverText, then the PDF document is a searchable with an overlay image on top of each page. IsSvgSupported will be true since the document has text than can be parsed. The value of IsSvgViewingPreferred will be set to false however since viewing a page from this document as SVG will not have any benefits because the SVG data is hidden behind an overlay image.
If the return value is PDFContentType.Image, then the PDF document is pure raster with no other content besides an image for each page (for example, a scanned document). IsSvgSupported will be false since the document does not have any text than can be parsed. The value of IsSvgViewingPreferred will be set to false as well.
Note that when the value of IsSvgSupported is false, then the value of IsSvgViewingPreferred will always be false too.
For an example, refer to DocumentImages.