teambob / docfrac

DocFrac is a document converter that can convert between RTF, HTML and ASCII text. This includes RTF to HTML and HTML to RTF. Supports text formatting (e.g. bold); tables; and most European languages. Available for Windows; Linux; ActiveX and DLL.
GNU General Public License v2.0
13 stars 6 forks source link

[Feature] Fails on CSS div elements [sf#10] #54

Open teambob opened 9 years ago

teambob commented 9 years ago

Reported by davemc50 on 2006-07-19 22:06 UTC Fails to convert attached single page html order document file using divs and css for layout.

teambob commented 9 years ago

Commented by davemc50 on 2006-07-19 22:06 UTC Sales Order Form Attached file OrderPrintCurrent%5B1%5D.htm:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
  <head id="PrintPageHead"><title>
    Order - Portables Plus
</title><meta http-equiv="content-type" content="text/html;charset=utf-8" /><meta http-equiv="author" content="McPond eCommerce Software (c) 2006" />

    <!-- No external style links, this is a standalone document -->
  </head>
  <body style="background-color:white; color:black; font-family: arial, verdana, helvetica; font-size:11px;">
    <!-- Dont really want a form, but ASP will insist. -->
    <form name="PrintForm" method="post" action="OrderPrintCurrent.aspx?or=SO100818" id="PrintForm">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTQ0NDc5MTQ0Ng9kFgICAw9kFiACAQ8PFgIeBFRleHQFEkNhbXB1cyBpVCAtIFRpbGwgMWRkAgMPDxYEHwAFEkNhbXB1cyBpVCAtIFRpbGwgMR4HVmlzaWJsZWhkZAIFDw8WAh8AZWRkAgcPDxYCHwAFC1NhbGVzIE9yZGVyZGQCCQ8PFgIfAAUIU08xMDA4MThkZAILDw8WAh8ABQZDQVMwMDFkZAINDw8WAh8ABQoyMDA1LTEwLTA4ZGQCDw8PFgIfAGVkZAIRDw8WAh8ABQRDQVNIZGQCEw8PFgIfAAUJQ2FtcHVzIElUZGQCHQ8WAh4LXyFJdGVtQ291bnQCARYCZg9kFgJmDxUHB0FDQzAwODkcLi4vUHJvZHVjdEltYWdlL1doaXRlRG90LmdpZgdBQ0MwMDg5HlN0bSBXYXZlIEJhY2twYWNrIEJhZyAtIE5hdnkvQQQxLjAwBjE2OS4wMAYxNjkuMDBkAh8PDxYCHwAFATFkZAIhDw8WAh8ABQYxNjkuMDBkZAIjDw8WAh8ABQQ2LjAwZGQCJQ8PFgIfAAUFMjEuODhkZAInDw8WAh8ABQYxOTYuODhkZGTKW+DB5M3fK22c+IzE3jYj9iTD9Q==" />
</div>

<script type="text/javascript">
<!--
var theForm = document.forms['PrintForm'];
if (!theForm) {
    theForm = document.PrintForm;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
// -->
</script>

<script src="/DaveMcMain/WebResource.axd?d=8EkkL-H_3ZRIL8_spkN0lQ2&amp;t=632888235897190819" type="text/javascript"></script>

     <!-- wrap whole page in this div -->
     <div id="divWholePage" style="border: solid 3px gray; width:auto; padding:4px;">

         <div id="divHeader" style="forder: dotted 2px red;">

          <!--order header display, left side -->
          <div id="divHeaderLeftColumn" style="forder: dotted 2px black; float:left; ">
            <div><img src="http://left.pumpernickel.co.nz/www/customer/portables/portables_logo_plus_p_only.png" alt="Logo"/></div>
            <div style="margin-left: 29px; margin-top:-8px; font-size:large; font-weight:bolder; letter-spacing:4px;">PORTABLES PLUS</div>
            <div style="margin-left: 29px; font-size:x-small; color:#999999;">SOLUTIONS FOR A MOBILE WORLD</div>

            <!--To-->
            <div style="forder: solid 2px orange; margin-top:40px;">
                      <p><span id="lblDeliveryName">Campus iT - Till 1</span><br />

                         <span id="lblDeliveryAddress"></span><br /></p>

            </div>
          </div>

          <div id="divHeaderRightColumn" style="float:right; text-align:left; forder: dotted 2px green;">
            <div id="divCompanyAddressBlock" style="font-size:x-small;">
              Portables Plus Group Limited<br />
              600 Great South Road, Greenlane.<br />
              PO Box 112-036, Penrose, Auckland.<br />
              Phone 09 579 1095 Fax 09 579 1096<br />
              GST No 12-345-678<br />
              <a href="http://www.portables.co.nz">www.portables.co.nz</a>
            </div>

            <div id="divDocumentTitle" style="">
              <h2><span id="lblSalesType">Sales Order</span></h2>
            </div>      

            <div id="divNumberBlock" style="border-top: solid 2px black; border-bottom: solid 2px black; margin-bottom:20px;">
              <div><div style="display:inline; width:90px; border-bottom: dotted 1px black;">Number:</div><span id="lblSalesId">SO100818</span></div>
              <div>Account:<span id="lblCustAccount">CAS001</span></div>
              <div>Date:<span id="lblDate">2005-10-08</span></div>
              <div>Page:1 of 1</div>
              <div>Your Reference:<div><span id="lblOrderNumber"></span></div></div>
              <div>Payment:<span id="lblPayment">CASH</span></div>
            </div>      

            <div id="divManagerBox" style="border-top: solid 2px black; border-bottom: solid 2px black; margin-bottom:20px;">
              <div>Account Manager:</div>
              <div>Branch:<span id="lblBranch">Campus IT</span></div>
              <div>Contact:<span id="lblContactName"></span></div>
              <div>eMail Address:<span id="lblContacteMail"></span></div>
              <div>Phone Number:<span id="lblPhone"></span></div>
            </div>      

          </div><!-- End of right column -->

          <!-- General temporal messages related to this order - even printable ones since it has the errors in it -->
          <div style="">
            <span id="lblMessage"></span>
          </div>

          <div id="divColumnTitle" style="clear:both; border-top: solid 2px black; border-bottom: solid 2px black;">
            <span>Image</span>           
            <span>Product Code</span>
            <span>Description</span>
            <span>Quantity</span>
            <span>Unit Price</span>
            <span>Amount</span>
          </div>

      </div><!-- header end-->

      <!-- Order Lines Section -->
      <div id="divOrderLines">

                  <div style="">
                    <span><a style="" href="../WebForms/OneProduct.aspx?ic=ACC0089"><img src="../ProductImage/WhiteDot.gif"/></a></span>
                    <span><a href="../WebForms/OneProduct.aspx?ic=ACC0089">Stm Wave Backpack Bag - Navy/A</a></span>
                    <span style="text-align:right;">1.00</span>
                    <span style="text-align:right">169.00</span>
                    <span style="text-align:right">169.00</span>
                  </div>

      </div>

          <!--Order Total-->
          <div id="divOrderTotal" style="float:right; margin-bottom:10px; margin-top:20px;">
              <table style="margin-left: 10px">
                <tr>
                  <td class="priceTextLabel"><span id="lblItemCount">1</span> Lines Sub-Total</td>
                  <td align="right" class="priceText"><span id="lblItemsAmount">169.00</span></td>
                </tr>
                <tr>
                  <td class="priceTextLabel">Freight</td>
                  <td align="right" class="priceText"><span id="lblCourierAmount">6.00</span></td>
                </tr>
                <tr>
                  <td class="priceTextLabel">GST</td>
                  <td align="right" class="priceText"><span id="lblGSTAmount">21.88</span></td>
                </tr>
                <tr>
                  <td class="priceTextLabel">Total</td>
                  <td style="text-align:right; border-top: solid 1px black; border-bottom: double 1px black;">$<span id="lblTotalAmount">196.88</span></td>
                </tr>
              </table>
          </div><!-- end Order Total -->

       <div id="divFooter" style="clear:both; font-size:x-small; border-top: solid 2px black; border-bottom: solid 2px black;">
            <div style="display:inline;">Disclaimer:</div>
            <div style="margin-left: 70px; display:inline;">It is a condition of sale of all goods and services that the Consumer Guarantees Act 1993 will not apply to goods and services acquired for business purposes.</div>
            <div style="clear:both;"></div>
            <div style="display:inline;">Terms of Trade:</div>
            <div style="margin-left: 70px; display:inline;">Full payment is required on confirmation of this order or in accordance with previously approved credit terms. All goods will remain the property of Portables Plus Group Limited until paid in full.</div>
       </div><!-- end footer section -->

     </div><!-- End whole page wrapper -->

<div>

    <input type="hidden" name="__SCROLLPOSITIONX" id="__SCROLLPOSITIONX" value="0" />
    <input type="hidden" name="__SCROLLPOSITIONY" id="__SCROLLPOSITIONY" value="0" />
    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
    <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
</div>

<script type="text/javascript">
<!--

theForm.oldSubmit = theForm.submit;
theForm.submit = WebForm_SaveScrollPositionSubmit;

theForm.oldOnSubmit = theForm.onsubmit;
theForm.onsubmit = WebForm_SaveScrollPositionOnSubmit;
// -->
</script>
</form>          
  </body>
</html>
teambob commented 9 years ago

Commented by andrewpunch on 2006-10-15 23:19 UTC Logged In: YES user_id=928005

Unfortunately the RTF standard does not easily support CSS style information. As a result Docfrac is not currently designed to support CSS.

This is definitely something that should be done in the future so I am marking it as a feature request.