Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

EO pdf control repeating values when it shouldn’t Options
Beth Swanson
Posted: Wednesday, February 12, 2020 10:27:09 AM
Rank: Newbie
Groups: Member

Joined: 2/10/2020
Posts: 1
We just recently purchased the EO controls and we’re having some issues with the HTML to PDF control. The issue that we’re having is that the control is duplicating some of the values when it creates the final PDF document.

Here is what it’s doing:
When I run my project (visual studio 2017 c#) my asp.net page loads correctly. When I inspect the element in question on my page I see this:
<div id="ContentPlaceHolder1_edstaffNoStatement" class="noStatement"><ul><li><p class="importance-statements"> You indicated that maintenance of specialty certification for nurses IS NOT required of nurses staffing the ED.</p></li></ul><br><p class="importance-statements"><strong>IMPORTANCE: </strong>Credentialing for nursing staff who see pediatric patients is important to ensure critical staff stays up-to-date on current treatment guidelines and protocols, and for maintenance of psychomotor skills necessary to care for this population of patients.</p><br><br></div>
Looks like this:
• You indicated that maintenance of specialty certification for nurses IS NOT required of nurses staffing the ED.
IMPORTANCE: Credentialing for nursing staff who see pediatric patients is important to ensure critical staff stays up-to-date on current treatment guidelines and protocols, and for maintenance of psychomotor skills necessary to care for this population of patients.


If I click the button on my form to export this control using the EO object this element is duplicated
• You indicated that maintenance of specialty certification for nurses IS NOT required of nurses staffing the ED.
IMPORTANCE: Credentialing for nursing staff who see pediatric patients is important to ensure critical staff stays up-to-date on current treatment guidelines and protocols, and for maintenance of psychomotor skills necessary to care for this population of patients.
• You indicated that maintenance of specialty certification for nurses IS NOT required of nurses staffing the ED.
IMPORTANCE: Credentialing for nursing staff who see pediatric patients is important to ensure critical staff stays up-to-date on current treatment guidelines and protocols, and for maintenance of psychomotor skills necessary to care for this population of patients.

If I run the print to pdf on my local machine: Ctrl + P -> Microsoft Print to PDF I see my expected results:
• You indicated that maintenance of specialty certification for nurses IS NOT required of nurses staffing the ED.
IMPORTANCE: Credentialing for nursing staff who see pediatric patients is important to ensure critical staff stays up-to-date on current treatment guidelines and protocols, and for maintenance of psychomotor skills necessary to care for this population of patients.


Here is my code that populates my div.
Default.aspx
<%-- EdStaff Section --%>
<div id="edstaffSection" runat="server">
<br />
<div class="sectionBanner">
<div class="sectionTitle">Physicians, Nurses, and Other Health Care Providers Who Staff the ED</div>
<div class="sectionScoreBox">YOUR SCORE:<br /><span class="sectionScore"><asp:Label ID="lblEdStaff" runat="server"></asp:Label> out of 10</span></div>
</div>
<asp:Table runat="server" id="EdStaff" CssClass="pedsReadyTable">
</asp:Table>
<br />
<div class="noStatement" id="edstaffNoStatement" runat="server"></div>
</div>

Default.aspx.cs
Code to create the pdf:
//Get the current time
DateTime now = DateTime.Now;

//Create a file name based on the current time
string fileName = string.Format("GapAnalysis-{0:yyyy-MM-dd}.pdf", now);

//Register
EO.Pdf.Runtime.AddLicense(ConfigurationManager.AppSettings.Get("EOLicense"));


////Set the page size as A5
EO.Pdf.HtmlToPdf.Options.PageSize = new SizeF(8.5F, 11F);
EO.Pdf.HtmlToPdf.Options.InvisibleElementIds = "buttons;Footer1_Panel2";
EO.Pdf.HtmlToPdf.Options.FooterHtmlPosition = 10.5F;
EO.Pdf.HtmlToPdf.Options.FooterHtmlFormat = "<div style='text-align:center;font-family:arial;font-size:0.75em;'><strong>Page {page_number} of {total_pages}</strong> - 2020 Pediatric Readiness Gap Report</div>";
EO.Pdf.HtmlToPdf.Options.OutputArea = new RectangleF(-0.5F, 0.5F, 9.75F, 9.75F);
EO.Pdf.HtmlToPdf.Options.AutoFitX = HtmlToPdfAutoFitMode.None;
//Page header with "variable"


//Export the current page as PDF
ASPXToPDF1.RenderAsPDF(fileName);

eo_support
Posted: Wednesday, February 12, 2020 3:40:13 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 21,938
Hi,

We have replied your email. You can either reply the email or directly here.

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.