Support,
I tried adding <html><body> my html text </body></html> and nothing is getting changed. Here is an example of the text which appears the same:
<span style="font-size: 12pt; font-family:Arial, sans-serif;">Construction of a new 33,00 sf, three story building with tenants on floors 2 and 3; </span>
Dim NoteAreaHTML As New ceTe.DynamicPDF.PageElements.Html.HtmlArea("<html><head></head><body>" & rowNote("Description").ToString & "</body></html>", NewX, TempY, w, 100)
BodyHeight = NoteAreaHTML.GetRequiredHeight
HasOverflow = True
RequiredHeight = 8
While HasOverflow
Try
RequiredHeight = NoteAreaHTML.GetRequiredHeight()
NoteAreaHTML.Height = RequiredHeight
If BodyBottom < CurrentY + NoteAreaHTML.GetRequiredHeight Then
NoteAreaHTML.Y = CurrentY
NoteAreaHTML.Height = BodyBottom - CurrentY
CurrentPage.Elements.Add(NoteAreaHTML)
AddNewPage(MyDocument)
CurrentY = HeaderHeight + 18
HasOverflow = True
Else
NoteAreaHTML.Y = CurrentY
CurrentPage.Elements.Add(NoteAreaHTML)
HasOverflow = False
End If
If HasOverflow Then
'NoteArea = NoteArea.GetOverflowHtmlArea
NoteAreaHTML = NoteAreaHTML.GetOverflowHtmlArea()
End If
Catch ex As Exception
HasOverflow = False
End Try
End While
Try
NoteAreaHTML.Y = CurrentY + 3
CurrentPage.Elements.Add(NoteAreaHTML)
Catch ex As Exception
End Try
TempY = NoteAreaHTML.Y + NoteAreaHTML.Height + LineSpacing
HTMLArea doesn't render any of the HTML
Re: HTMLArea doesn't render any of the HTML
Support · Apr 6, 2022Hi,
We tested this and are able to render the text without any problem.
Here is the code we used:
Document document = new Document();
String htmlText = @"<html>"+
"<head>"+
"</head>"+
"<body>"+
"<span style=\"font-size: 12pt; font-family:Arial, sans-serif;\">Construction of a new 33,00 sf, three story building with tenants on floors 2 and 3; </span>"+
"</body>"+
"</html>";
HtmlArea htmlArea = new HtmlArea(htmlText, 0, 0, 512, 692);
do
{
Page page1 = new Page();
page1.Elements.Add(htmlArea);
document.Pages.Add(page1);
htmlArea = htmlArea.GetOverflowHtmlArea();
} while (htmlArea != null);
string output = @"C:\Temp\MyDocument.pdf";
document.Draw(output);
Please try the above code sample on your end and see it works for you.
If you continue facing an issue, then please send over the following information to [^a|mailto:support@dynamicpdf.com|opennewwindow|support@dynamicpdf.com^] so we can look into it further.
1. Simple code sample which uses static data to recreate the behavior, or you can modify the above code sample to recreate the behavior and send it over to us.
2. Output PDF.
3. Exact version and build number of DynamicPDF Core Suite for .NET product DLL file. You can find this information by right clicking on the DLL file>>Properties>>Details tab>>Product version. Take a screenshot of Details tab and send it over to us.
Thanks,
ceTe Software Support Team