Hi everyone,
I am trying to convert the following quite simple HTMl to PDF
<!DOCTYPE html>
<
html
>
<
head
>
<
title
>Configuration</
title
>
<
meta
charset
=
"utf-8"
/>
<
style
type
=
"text/css"
>
body{
font-family:Verdana,Arial;
color:black
}
th{
background-color: silver
}
table {
width: 100%;
border: solid 1px gray;
margin-bottom: 32px
}
td {
border-top: solid 1px gray
}
</
style
>
</
head
>
<
body
>
<
hr
/>
<
h2
>Offer Configuration</
h2
>
<
div
style
=
"width:80%;margin-left:auto;margin-right:auto"
>
<
table
align
=
"center"
cellpadding
=
"0"
cellspacing
=
"0"
style
=
"width:600px"
>
<
tr
>
<
th
>Document</
th
>
<
th
>Date</
th
>
<
th
>Sales Person</
th
>
</
tr
>
</
table
>
<
br
/>
<
table
align
=
"right"
cellpadding
=
"0"
cellspacing
=
"0"
style
=
"width:30%;float:right"
>
<
tr
>
<
th
>Total</
th
>
</
tr
>
<
tr
>
<
td
>${PL_TOTAL}</
td
>
</
tr
>
</
table
>
<
br
/>
</
div
>
<
div
id
=
"divFooter"
>
</
div
>
</
body
>
</
html
>
This is the code I am using
Dim
htmlDocument = ProviderHtml.Import(My.Resources.Resource1.order)
Using output
As
New
FileStream(
"c:\temp\out.pdf"
, FileMode.Create)
ProviderPdf.Export(htmlDocument, output)
End
Using
Process.Start(
"c:\temp\out.pdf"
)
Problem is, the output is very different from source the HTML:
- the HR arenot displayed
- the tables width are ignored
Note that pasting the same HTML here https://demos.telerik.com/aspnet-ajax/editor/examples/import-export/pdf-export/defaultcs.aspx generates an invalid PDF
Is there anything I am missing?
Thanks