Welcome Guest Search | Active Topics | Sign In | Register

SVG and options.MinLoadWaitTime Options
Droddy
Posted: Wednesday, January 22, 2014 8:44:43 AM
Rank: Member
Groups: Member

Joined: 1/22/2014
Posts: 20
I've searched the forum on SVG and my impression is that tweaking MinLoadWaitTime is the only way to ensure that SVG areas are fully rendered before converting HTML to PDF. Is this right? Is there some other way to detect that all SVGs are rendered and, perhaps, no XHR requests waiting before, say, calling eopdf.convert()?
eo_support
Posted: Wednesday, January 22, 2014 9:04:07 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

I believe if you have an inline SVG element (the SVG XML is directly inside your document), then it should render fine. However if the SVG is from an Url, then the converter may occurs before the SVG document has been fully loaded. If that's the case, you can write some JavaScript to check whether the SVG has been loaded, if it has been loaded, then call eopdf.convert(), otherwise setup a timer to check again:

Code: JavaScript
function checkSVG() 
{
    var svg = document.getElementById(svg_element_id).getSVGDocument();
    if (!svg)
    {
        //Try again later
        setTimeout("checkSVG()", 100);
    } 
    else 
    {
        //Trigger the converter
        eopdf.convert();
    }
}


Please let us know if that works for you.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.