PDF layout

Last post 07-03-2006, 2:38 PM by Adam. 4 replies.
Sort Posts: Previous Next
  •  06-28-2006, 6:16 PM 20571

    PDF layout

    I'm using the SavePDF Method, but the saved pdf file is always in landscape layout, and the "ol" and "ul" lists get out-dented (as opposed to indented or lined up evenly)  How do I control the page layout and other formatting?
     
    Thanks,
    Neil
  •  06-29-2006, 12:36 AM 20577 in reply to 20571

    Re: PDF layout

    Neil,
     
    Please download the control again. The layout issue is resolved.
     
    >>and the "ol" and "ul" lists get out-dented (as opposed to indented or lined up evenly)
     
    This is a known issue. We will resolve it in the next version.
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-03-2006, 1:16 PM 20669 in reply to 20577

    Re: PDF layout

    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
  •  07-03-2006, 2:25 PM 20670 in reply to 20669

    Re: PDF layout

    Another thing: is there a way to specify page breaks?
     
    Thanks,
    Neil
  •  07-03-2006, 2:38 PM 20671 in reply to 20670

    Re: PDF layout

     nsareen wrote:
    Another thing: is there a way to specify page breaks?
     
    Thanks,
    Neil
     
    Yes. Please check the following code:
     
       t= "<html><body>Hello World</body></html>";
       CuteEditor.Convertor.PDF.HTML2PDF html2pdf = new CuteEditor.Convertor.PDF.HTML2PDF(t);
       html2pdf.RenderSinglePageContent = false;
       html2pdf.PageHeight = (int)CuteEditor.Convertor.PDF.PDFUtils.PageHeight;
       html2pdf.Render();
       html2pdf.Save(path);
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML