Thank you, looks good. Now, I'm trying to set a margin so that the resulting pdf is not pushed all the way to the left of the document. I've tried doing a <table> adding margin attributes to the style, as well as trying to add margin attributes to the style of the body and div, but each time I call SavePDF(), I get a NullReferenceException:
System.NullReferenceException was unhandled by user code
Message="Object reference not set to an instance of an object."
Source="CuteEditor"
StackTrace:
at CuteEditor.Convertor.PDF.PDFTable.AdjustWidth()
at CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2)
at CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2)
at CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2)
at CuteEditor.Convertor.PDF.HTML2PDF.a(HTMLNode A_0, FontStyle A_1, Int32& A_2)
at CuteEditor.Convertor.PDF.HTML2PDF.Render()
at CuteEditor.Editor.SavePDF(String path)
at _Default.Button1_Click(Object sender, EventArgs e) in c:\Projects\HTMLToPDF\Default.aspx.cs:line 44
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
How do I combat this?
Thanks,
Neil