Convert HTML To PDF Using Telerik

If you are using Telerik and would  like to convert HTML to PDF you will see that there is no code sample that really works on Telerik's website.
So I called support and they answered with the code.
Here is the  "magic":
  1. var htmlDocument = new Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider();  
  2. var doc = htmlDocument.Import(File.ReadAllText(@"..\..\test.html"));  
  4. var pdf = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();  
  5. using (Stream output = File.OpenWrite(@"..\..\result.pdf"))  
  6. {  
  7.     pdf.Export(doc, output);  
  8. }  
I hope this helps me in the future or someone else.
Happy coding.