Hi,
I am using the EO's HtmlToPdf.ConvertUrl method to obtain a PDF Result.
I've a simple requirement where in I do not want controls like buttons,images to appear in a PDF.
I'm using a jquery code to hide these when the html is ready.
From the html created I use the ConvertUrl to create a PDF.(on demand)
I'm seeing that the controls (of type submit etc) are actually hidden in html page that feeds to PDF.
However the PDF document that I obtain has such controls
visible.
(1)Jquery code:->>$(document).ready(function () {
$("#dvEO").addClass('imgPrint');//this is the id of a div inside which the button exists.
});
//also tried to remove the div using .remove()
(2)The CSS class://This is to hide the visibility
.imgPrint
{
visibility:hidden;
display:block;
width:0px;
background-color: White;
}
(3)The HTML has the following div (that I hide using the jquery) .<DIV id=dvEO>
<INPUT style="WIDTH: 200px" id=ctl00_ContentPlaceHolder1_btnA value="Hide Me" type=submit name=ctl00$ContentPlaceHolder1$btnA>
</DIV>
My observation is that the jquery executes the code when the html is ready, but the result (pdf) isn't the same as html that is loaded.
Before posting this I've searched your forum for similar issues and considered setting
HtmlToPdf.Options.MinLoadWaitTime = 5000;
which isn't helping.
Do you think if I'm missing anything here?
PS: I do not intend to use InvisibleElementIds(which actually hides the button) as I want to use save to PDF across the website and id's of such buttons vary.
Details:
EO vesrion: 3.0.95.2
jquery:jQuery v1.7.2 jquery.com
Kindly help.
Regards.
G