Gets a raster image that represents contains only the image elements of the SVG document for this page.
DocumentPage.prototype.getSvgBackImage = function(backColor)
getSvgBackImage(backColor: string): string;
Color to use to fill the background of the image.
Raster image that represents contains only the image elements of the SVG document for this page if this page supports SVG and the SVG data contains image elements; otherwise, null.
This method will be deprecated. Use GetSvgBackImageUrl instead.
GetSvgBackImageUrl is used to get a raster image that represents contains only the image elements of the SVG document for this page. Not all document types support this method, this depends on the value of DocumentImages.IsSvgSupported.
This method works as follows (the "item" is the raster image passed by the user):
If this document does not support SVG (the value of DocumentImages.IsSvgSupported is false), then an exception will be thrown.
If an item was found in the cache, it is returned right away. This is available if the document was created using the cache system. Serialization is used to create the image object from the data found in the cache.
The SVG data for this page is loaded with everything dropped except the image elements. If the result document is empty (the page does not contain any image elements in its SVG), then null is returned.
Otherwise, a new image is created and filled with backColor (if its not a transparent color) then the SVG data containing only the image elements is rendered on the surface of this image. The size of the result raster image is the same size as this page.
The image object is saved to the cache before it is returned. Next time this method is called, the image will be returned from the cache directly without loading it from the file or creating a new instance.
GetSvgBackImageUrl will check the cache first, hence, subsequent calls will return the value set by this method.
If the value of ImageScale is a value greater than 1, then the result image will have a size that is equal to Size / ImageScale.
Refer to Loading Using LEADTOOLS Documents Library for more information.
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.