I have HTML rendered from a list view:
Dim objSW As New System.IO.StringWriter()
Dim objHTW As New System.Web.UI.HtmlTextWriter(objSW)
lvOutput.RenderControl(objHTW)
Session("output") = objSW.ToString
I need this string to be exported to PDF in landscape with minimal margins. I tried using the ASPxHTMLEditor and setting the html property equal to the string, then using htmlSI.Export(HtmlEditorExportFormat.Pdf, pdfName). The PDF gets created and downloaded, but there is no way to change the settings.
I saw a post about importing the html to a RichEdit, then exporting to pdf but couldn't find any code examples of that full process. Is this still the best way to accomplish my task?
Can you provide a code example that will take my html string and produce a PDF with margins and landscape orientation?