I have use spire doc for Converting Html to image.
i am using below code
- Code: Select all
Document document = new Document();
document.LoadFromFile(@"E:\data.html", FileFormat.Html, XHTMLValidationType.None);
Image image = document.SaveToImages(0, ImageType.Bitmap);
When i am load document i am getting error "Illegal characters in path."
My path is correct,I thought my html has some invalid characters,
I am attaching text file with my html code, please look and let me know, where i am doing wrong..
please help
this is my html .
- Code: Select all
<!DOCTYPE html><html xmlns='http://www.w3.org/1999/xhtml' style class=' js no-touch svg inlinesvg svgclippaths no-ie8compat csstransforms csstransforms3d csstransitions'><head><link rel='stylesheet' href='http://localhost/RedLine/css/DesignStyle.css'/><style>#designarea, .designmainareaall, #workarea {background:none !important;}.ui-resizable-handle {display:none;} body{padding-top:50px;}</style></head><body><section id='designhtml' class='main'>
<form>
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNjkxNDUwNDk5ZGTQ/wnFDqIgR0OqKKCP1QXdfQ/n1TCJgcd9qNG6Y3yc9Q==">
</div>
<div id="printarea">
<div>
<div id="designinfo" style="margin-left: 45px;margin-bottom: 5px;font-weight: bold;">
</div>
<div class="row" id="designarea">
<div class="span8" id="designrightarea">
<div class="designmainarea">
<div class="designmainareaall">
<div id="workarea" style="background: #bfbfbf; position: relative; height: 550px; overflow: visible;">
<div id="workarea_inner" style="left: 21px; top: 0; width: 1200px; height: 530px; position: relative; overflow: visible;">
<div class="gridlinearea" style="width: 384px; height: 75px; background-size: 36px 36px, 36px 36px, 6px 6px, 6px 6px; top: 105px; left: 106px; position: relative;"></div>
<div id="product1" class="product" style="top: 107px; left: 106px; z-index: 1;"><div class="resize_area" style="-webkit-transform: rotate(0deg);"><img src="http://localhost/RedLine/images/ProductImages/bfy_1aa_1LEAF/843571ed-ae19-4dde-ba49-726016be60bf.jpg?abc=0.9743638646323234" resw="true" resh="true" prc="t1" d="10.25" resd="true" alt="" style="height: 90px; width: 60px;"><div class="hdims">10.00</div><div class="vdims" style="top: -68px; left: -38px;">15.00</div><div class="ui-rotatable-handle ui-draggable"></div></div></div><div id="product2" class="product" style="top: 108px; left: 212px; z-index: 2;"><div class="resize_area" style="-webkit-transform: rotate(0deg);"><img src="http://localhost/RedLine/images/ProductImages/bfy_1aa_1LEAF/11da108a-0254-40fe-830f-e2a814bc84ba.png?abc=0.36420341534540057" resw="true" resh="true" prc="Example" d="13.86" resd="true" alt="" style="height: 72px; width: 72px;"><div class="hdims">12.00</div><div class="vdims" style="top: -59px; left: -44px;">12.00</div><div class="ui-rotatable-handle ui-draggable"></div></div></div><div id="product3" class="product" style="top: 105px; left: 322px; z-index: 3;"><div class="resize_area" style="-webkit-transform: rotate(0deg);"><img src="http://localhost/RedLine/images/ProductImages/bfy_1aa_1LEAF/7fd022b6-3602-48d8-b08c-b121c0910fae.png?abc=0.7803066312335432" resw="true" resh="true" prc="t45" d="12.52" resd="true" alt="" style="height: 90px; width: 60px;"><div class="hdims">10.00</div><div class="vdims" style="top: -68px; left: -38px;">15.00</div><div class="ui-rotatable-handle ui-draggable"></div></div></div><div id="product4" class="product" style="top: 108px; left: 430px; z-index: 4;"><div class="resize_area" style="-webkit-transform: rotate(0deg);"><img src="http://localhost/RedLine/images/ProductImages/bfy_1aa_1LEAF/4508e827-25cf-4ebd-8eb5-bb6f5fbc230e.png?abc=0.0092893335968256" resw="true" resh="true" prc="trep548" d="13.65" resd="true" alt="" style="height: 90px; width: 60px;"><div class="hdims">10.00</div><div class="vdims" style="top: -68px; left: -38px;">15.00</div><div class="ui-rotatable-handle ui-draggable"></div></div></div></div>
</div>
</div>
</div>
</div>
<div class="clr"></div>
</div>
</div>
<div id="dialog_resize" title="Resize" style="display: none;">
<div>
Width :<input type="text" id="txtwidth" class="numeric" style="margin-left: 10px;">
</div>
<div style="padding-top: 5px;">
Height :<input type="text" id="txtheight" class="numeric" style="margin-left: 6px;" />
</div>
</div>
</div>
</form>
<div id="loading-indicator-form1-overlay" class="loading-indicator-overlay" style="width: 1366px; height: 551px; left: 0px; position: absolute; top: 5px; z-index: 5000;"></div><div id="loading-indicator-form1" class="loading-indicator" style="position: absolute; z-index: 5001; left: 633px; top: 205.5px;"></div></section></body></html>