C# 使用绝对位置打印多页HTML

C# 使用绝对位置打印多页HTML,c#,html,css,printing,crystal-reports,C#,Html,Css,Printing,Crystal Reports,我的任务是将Crystal报告转换为HTML(和/或PDF)报告,该报告将打印pick tickets。部分原因是DLL地狱(即CR)和原始报告中一些我们不需要的公开复杂性 这不是一个非常直接的问题,尽管它可以变成一个问题。我已经完成了这个项目,并让它工作,这样它可以为每个页面处理一组HTML,填充数据字段,然后使用iText7将其转换为PDF,并将页面合并为一个大文件。完成后,我使用Sumantra PDF打印(这样我可以控制打印机设置) 我使用的模板由Crystal Reports生成,并将

我的任务是将Crystal报告转换为HTML(和/或PDF)报告,该报告将打印pick tickets。部分原因是DLL地狱(即CR)和原始报告中一些我们不需要的公开复杂性

这不是一个非常直接的问题,尽管它可以变成一个问题。我已经完成了这个项目,并让它工作,这样它可以为每个页面处理一组HTML,填充数据字段,然后使用iText7将其转换为PDF,并将页面合并为一个大文件。完成后,我使用Sumantra PDF打印(这样我可以控制打印机设置)

我使用的模板由Crystal Reports生成,并将所有DIV元素设置为绝对位置

    <div id="hdr_salesorder_title" class="std_div" nowrap="true" style="z-index:25;top:444px;left:19px;width:133px;height:16px;"><span class="hdr_bold_italic">Sales Order Number:</span></div>
    <div id="hdr_salesorder_data" class="std_div" nowrap="true" style="z-index:25;top:463px;left:19px;width:133px;height:17px;"><span class="hdr_std_text">@SALESORDER</span></div>
    <div id="hdr_shipdate_title" class="std_div" nowrap="true" style="z-index:25;top:444px;left:153px;width:67px;height:17px;"><span class="hdr_bold_italic">Ship Date</span></div>
    <div id="hdr_shipdate" class="std_div" nowrap="true" style="z-index:25;top:463px;left:153px;width:72px;height:17px;"><span class="hdr_std_text">@SHIPDATE</span></div>
但是绝对值超过了分页符。除了浏览一个非常复杂的html文件和替换每个页面的top和left之外,还有没有一种方法可以告诉打印/浏览器,每个分页符都是一个新的top?如果我没有正确获得每页的偏移量,那么使用替代方法会让我担心

我现在的工作是:

  • 打开模板并拆分部分
  • 获取数据
  • 循环遍历数据种子设定数据以替换placesetter。
    • 使用iText7将html转换为PDF
    • 使用iText7将页面合并到主pdf文档
  • 处理完所有数据后
  • 保存文档
  • 使用Sumantra PDF打开文档
  • 使用Sumantra PDF打印文档
我担心的是,当我运行CR报告并保存PDF时,文件大小几乎比iText7文件小2/3英尺。这个过程可能需要处理超过1000页的票据,我担心网络和打印机的限制会被破坏。直接打印HTML似乎比PDF更有效,文件更小,对系统的影响更小,但我一直坚持使用绝对左上角

我也愿意接受与HTML更改相关的其他想法。我不是CSS或html方面的专家,尽管我精通CSS或html。Crystal Reports是一个地狱,我和我的公司都希望摆脱这两个成本,我们只在一份报告中使用它。我包含了用于报告的html模板。细节线是动态的,页脚部分需要在每页的底部,这就是为什么我担心相对定位

如果这是我得到的最好的,我会保留它,但我希望其他人可能会有一个不同的方法,我可以使工作不会如此资源密集型

<HTML>
<HEAD>
    <META NAME="Author" CONTENT="Crystal Reports 14.0">
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
    <link href='https://fonts.googleapis.com/css?family=Libre Barcode 39' rel='stylesheet'>
</HEAD>
<BODY>
    <style>
        div {
            position: absolute;
            z-index: 25
        }

        a {
            text-decoration: none
        }

            a img {
                border-style: none;
                border-width: 0
            }

        .relativeContainer {
            position: relative;
        }

        .block {
            height: 12px;
            width: 220px;
            display: block;
        }

        .relative {
            position: relative;
        }

        .std_text {
            font-size: 8pt;
            color: #000000;
            font-family: Arial;
            font-weight: normal;
        }

        .tote_text {
            font-size: 18pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
        }

        .acc_text {
            font-size: 18pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
        }

        .hdr_std_text {
            font-size: 9pt;
            color: #000000;
            font-family: Arial;
            font-weight: normal;
        }

        .hdr_bold_italic {
            font-size: 9pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
            font-style: italic;
        }

        .hdr_title_text {
            font-size: 6pt;
            color: #000000;
            font-family: Arial;
            font-weight: normal;
        }

        .hdr_barcode {
            font-size: 30pt;
            color: #000000;
            font-family: 'Libre Barcode 39';
            font-weight: normal;
        }

        .hdr_non_barcode {
            font-size: 19pt;
            color: #000000;
            font-family: 'Century Schoolbook';
            font-weight: normal;
        }

        .hdr_special1 {
            font-size: 9pt;
            color: #ffffff;
            font-family: Arial;
            font-weight: normal;
        }

        .dtl_hdr_top {
            top: 574px;
        }

        .hdr_addr_top {
            top: 386px;
        }

        .itm_hdr_text {
            font-size: 7pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
        }

        .item_bold_sm {
            font-size: 10pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
        }

        .item_sm {
            font-size: 10pt;
            color: #000000;
            font-family: Arial;
            font-weight: normal;
        }

        .item_bold_lg {
            font-size: 11pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
        }

        .std_div {
            border-color: #000000;
            border-left-width: 0;
            border-right-width: 0;
            border-top-width: 0;
            border-bottom-width: 0;
        }

        @page {
            margin-top: 0pt;
            margin-left: 0pt;
            margin-right: 0pt;
            margin-bottom: 0pt;
        }
    </style>
    <div id="hdr_second_page" class="std_div" nowrap="true" style="z-index:25;top:230px;left:200px;width:400px;height:32px;@HDRSHOW"><span class="item_bold_lg">THIS SECTION LEFT INTENTIONALLY BLANK</span></div>
    <div id="hdr_firstpage" style="z-index:3;top:0;left:0;@HDRCLEAR;">
        <div id="hdr_main" style="z-index:3;clip:rect(0px,768px,432px,0px);top:60px;left:15px;width:768px;height:432px;"></div>
        <div id="hdr_addressinfo_header" style="z-index:10;top:384px;left:224px;width:552px;height:17px;border-radius: 5px; border-color:#000000;border-style:solid;border-width:1px;background-color:#c0c0c0;layer-background-color:#c0c0c0;"></div>
        <!-- this section creates all the vertical lines for the grids -->
        <div id="hdr_spacer4" style="z-index:15;top:372px;left:23px;border-color:#000000;border-style:dotted;border-width:0px;border-top-width:1px;width:738px;"></div>
        <div id="hdr_spacer3" style="z-index:15;top:384px;left:407px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,94px,0px);height:94px;"></div>
        <div id="hdr_spacer2" style="z-index:15;top:384px;left:587px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,94px,0px);height:94px;"></div>
        <div id="hdr_spacer1" style="z-index:15;top:68px;left:400px;border-color:#000000;border-style:dotted;border-width:0px;border-left-width:1px;clip:rect(0px,1px,304px,0px);height:304px;"></div>
        <div id="middle_spacer2" style="z-index:15;top:492px;left:95px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,78px,0px);height:78px;"></div>
        <div id="middle_spacer1" style="z-index:15;top:492px;left:375px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,78px,0px);height:78px;"></div>
        <!-- end spacer section -->
        <div id="hdr_carousel" class="std_div" nowrap="true" style="z-index:25;top:64px;left:23px;width:50px;height:16px;"><span class="std_text">@ISCAROUSEL</span></div>
        <div id="hdr_weborderid_left_data" class="std_div" nowrap="true" style="z-index:25;top:132px;left:271px;width:114px;height:16px;"><span class="std_text">@CUSORDREF_0</span></div>
        <div id="hdr_weborderid_right_data" class="std_div" nowrap="true" style="z-index:25;top:132px;left:655px;width:114px;height:16px;"><span class="std_text">@CUSORDREF_0</span></div>
        <div id="hdr_soldto_data" class="std_div" nowrap="true" style="z-index:25;top:404px;left:231px;width:177px;height:75px;">
            @DIVBILLTOADDRESS
        </div>
        <div id="hdr_salesorder_title" class="std_div" nowrap="true" style="z-index:25;top:444px;left:19px;width:133px;height:16px;"><span class="hdr_bold_italic">Sales Order Number:</span></div>
        <div id="hdr_salesorder_data" class="std_div" nowrap="true" style="z-index:25;top:463px;left:19px;width:133px;height:17px;"><span class="hdr_std_text">@SALESORDER</span></div>
        <div id="hdr_shipdate_title" class="std_div" nowrap="true" style="z-index:25;top:444px;left:153px;width:67px;height:17px;"><span class="hdr_bold_italic">Ship Date</span></div>
        <div id="hdr_shipdate" class="std_div" nowrap="true" style="z-index:25;top:463px;left:153px;width:72px;height:17px;"><span class="hdr_std_text">@SHIPDATE</span></div>
        <div id="hdr_address_info" style="z-index:10;top:384px;left:224px;width:552px;height:92px;border-radius: 5px;border-color:#000000;border-style:solid;border-width:1px;"></div>
        <div id="hdr_Address_header1" class="std_div hdr_addr_top" nowrap="true" style="z-index:25;left:281px;width:82px;height:13px;"><span class="hdr_title_text">SOLD TO</span></div>
        <div id="hdr_Address_header2" class="std_div hdr_addr_top" nowrap="true" style="z-index:25;left:448px;width:82px;height:13px;"><span class="hdr_title_text">SHIP TO</span></div>
        <div id="hdr_Address_header3" class="std_div hdr_addr_top" nowrap="true" style="z-index:25;left:605px;width:82px;height:13px;"><span class="hdr_title_text">TOTE #</span></div>
        <div id="hdr_shipTo_right_data" class="std_div" nowrap="true" style="z-index:25;top:150px;left:550px;width:220px;height:83px;">
            @DIVSHIPTOADDRESS
        </div>
        <div id="hdr_shipid_barcode_left_data" class="std_div" nowrap="true" style="z-index:25;top:268px;left:167px;width:133px;height:12px;"><span class="hdr_title_text">@SHIPPINGID</span></div>
        <div id="hdr_shipid_barcode_right_data" class="std_div" nowrap="true" style="z-index:25;top:268px;left:551px;width:133px;height:12px;"><span class="hdr_title_text">@SHIPPINGID</span></div>
        <div id="hdr_custid_barcode_right_data" class="std_div" nowrap="true" style="z-index:25;top:268px;left:695px;width:80px;height:12px;"><span class="hdr_title_text">@CUSTOMERID</span></div>
        <div id="hdr_custid_barcode_left_data" class="std_div" nowrap="true" style="z-index:25;top:268px;left:319px;width:80px;height:12px;"><span class="hdr_title_text">@CUSTOMERID</span></div>
        <div id="hdr_operator_data" class="std_div" nowrap="true" style="z-index:25;top:459px;left:593px;width:75px;height:17px;"><span class="std_text">OPR = @OPR</span></div>
        <div id="hdr_pod_data" class="std_div" nowrap="true" style="z-index:25;top:459px;left:679px;width:75px;height:17px;"><span class="std_text">POD = @POD</span></div>
        <div id="hdr_tote_data" class="std_div" nowrap="true" style="z-index:25;top:425px;left:630px;width:100px;height:25px;"><span class="tote_text">@TOTE</span></div>
        <div id="hdr_barcode_left_data" class="std_div" nowrap="true" style="z-index:25;top:230px;left:167px;width:228px;height:32px;"><span class="hdr_@NONbarcode">@BARSHIPPINGID</span></div>
        <div id="hdr_barcode_right_data" class="std_div" nowrap="true" style="z-index:25;top:230px;left:551px;width:228px;height:32px;"><span class="hdr_@NONbarcode">@BARSHIPPINGID</span></div>
        <div id="hdr_shipTo_left_data" class="std_div relativeContainer" nowrap="true" style="z-index:25;top:150px;left:166px;width:220px;height:83px;">
            @DIVSHIPTOADDRESS
        </div>
        <div id="hdr_shipto_data" class="std_div" nowrap="true" style="z-index:25;top:403px;left:412px;width:172px;height:73px;">
            @DIVSHIPTOADDRESS
        </div>
        <div id="hdr_batchId_data" class="std_div" nowrap="true" style="z-index:25;top:409px;left:599px;width:167px;height:17px;"><span class="hdr_std_text">@BATCHID</span></div>
        <div id="logo_left" class="std_div" nowrap="true" style="z-index:25;top:@TOPTpx;left:@LEFTLpx;width:@TOPWpx;height:@TOPHpx;"><img src="C:\temp\PickTicketHTML\images\logo_@LOGO.png" border="0" width="@TOPWpx" height="@TOPHpx"></div>
        <div id="logo_right" class="std_div" nowrap="true" style="z-index:25;top:@TOPTpx;left:@LEFTRpx;width:@TOPWpx;height:@TOPHpx;"><img src="C:\temp\PickTicketHTML\images\logo_@LOGO.png" border="0" width="@TOPWpx" height="@TOPHpx"></div>
        <div id="logo_middle" class="std_div" nowrap="true" style="z-index:25;top:@TOPMpx;left:@LEFTMpx;width:@MIDWpx;height:@MIDHpx;"><img src="C:\temp\PickTicketHTML\images\logo_@LOGO.png" border="0" width="@MIDWpx" height="@MIDHpx"></div>
        <div id="agro_left" class="std_div" nowrap="true" style="z-index:24;top:124px;left:111px;width:151px;height:21px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\agro_message.png" border="0" width="151px" height="21px"></div>
        <div id="agro_right" class="std_div" nowrap="true" style="z-index:24;top:124px;left:495px;width:147px;height:18px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\agro_message.png" border="0" width="147px" height="18px"></div>
        <div id="inspection_left" class="std_div" nowrap="true" style="z-index:-1;top:150px;left:23px;width:134px;height:134px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\inspection_sticker.png" border="0" width="134px" height="134px"></div>
        <div id="inspection_right" class="std_div" nowrap="true" style="z-index:-1;top:150px;left:407px;width:134px;height:134px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\inspection_sticker.png" border="0" width="134px" height="134px"></div>
        <div id="meets_left" class="std_div" nowrap="true" style="z-index:25;top:284px;left:19px;width:376px;height:82px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\meets_standards.png" border="0" width="376px" height="82px"></div>
        <div id="meets_right" class="std_div" nowrap="true" style="z-index:25;top:284px;left:403px;width:376px;height:82px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\meets_standards.png" border="0" width="376px" height="82px"></div>
        <div id="middle_main" style="z-index:10;top:492px;left:17px;width:758px;height:75px;border-radius: 5px;border-color:#000000;border-style:solid;border-width:1px;"></div>
        <div id="middle_space" style="z-index:3;clip:rect(0px,768px,77px,0px);top:492px;left:15px;width:768px;height:77px;"></div>
        <div id="middle_canada_data" class="std_div" nowrap="true" style="z-index:25;top:514px;left:25px;width:48px;height:16px;"><span class="hdr_special1">@CAN</span></div>
        <div id="middle_state_data" class="std_div" nowrap="true" style="z-index:25;top:547px;left:25px;width:48px;height:25px;"><span class="mid_special">@STATE</span></div>
        <div id="middle_acc_data" class="std_div" nowrap="true" style="z-index:25;top:495px;left:25px;width:48px;height:30px;"><span class="acc_text">@ACC</span></div>
        <div id="middle_text1_data" class="std_div" nowrap="true" style="z-index:25;top:495px;left:378px;width:390px;height:70px;"><span class="std_text">@SOH1TEXT</span></div>
        <div id="middle_text2_data" class="std_div" nowrap="true" style="z-index:25;top:495px;left:97px;width:390px;height:70px;"><span class="std_text">@SOH2TEXT</span></div>
    </div>
    <div id="detail_header_titles" style="z-index:10;top:569px;left:15px;width:759px;height:24px;border-radius: 5px;border-color:#000000;border-style:solid;border-width:1px;background-color:#c0c0c0;layer-background-color:#c0c0c0;"></div>
    <div id="detail_headers" style="z-index:3;clip:rect(0px,768px,28px,0px);top:569px;left:15px;width:768px;height:28px;"></div>
    <div id="detail_spacer5" style="z-index:15;top:569px;left:95px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,26px,0px);height:26px;" /></div>
    <div id="detail_space4" style="z-index:15;top:569px;left:167px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,26px,0px);height:26px;"></div>
    <div id="detail_space3" style="z-index:15;top:569px;left:247px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,26px,0px);height:26px;"></div>
    <div id="detail_space2" style="z-index:15;top:569px;left:375px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,26px,0px);height:26px;"></div>
    <div id="detail_space1" style="z-index:15;top:569px;left:695px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,26px,0px);height:26px;"></div>
    <div id="detail_hdr_location" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:27px;width:52px;height:16px;"><span class="itm_hdr_text">Location</span></div>
    <div id="detail_hdr_shipped" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:103px;width:49px;height:16px;"><span class="itm_hdr_text">Shipped</span></div>
    <div id="detail_hdr_backord" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:183px;width:45px;height:16px;"><span class="itm_hdr_text">Bckord</span></div>
    <div id="detail_hdr_itemnumber" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:255px;width:112px;height:16px;"><span class="itm_hdr_text">Item&nbsp;Number</span></div>
    <div id="detail_hdr_description" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:431px;width:180px;height:16px;"><span class="itm_hdr_text">Description</span></div>
    <div id="detail_hdr_origin" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:703px;width:48px;height:16px;"><span class="itm_hdr_text">Origin</span></div>
    <!-- D1 Start of Detail template, do not remove these comments.  This section is removed and replaced by the program -->
    <div id="detail_line" style="z-index:3;clip:rect(0px,768px,17px,0px);top:@TOPDpx;left:15px;width:768px;height:17px;"></div>
    <div id="detail_location_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:16px;width:79px;height:15px;"><span class="item_bold_lg">@LOCATION</span></div>
    <div id="detail_qty_shipped_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:103px;width:64px;height:16px;text-align:center;"><span class="item_bold_lg">@QTYSHIP</span></div>
    <div id="detail_qty_backord_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:175px;width:64px;height:16px;text-align:center;"><span class="item_bold_lg">@QTYBACKORD</span></div>
    <div id="detail_itemnumber_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:263px;width:103px;height:16px;"><span class="item_bold_sm">@ITEMNUM</span></div>
    <div id="detail_description_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:375px;width:320px;height:16px;"><span class="item_sm">@DESCRIPTION</span></div>
    <div id="detail_origin_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:695px;width:80px;height:16px;"><span class="item_sm">@ORIGIN    @OSTATE</span></div>
    <!-- D1X End of Detail template -->
    <!-- D2 start of detail text line, do not remove these comments.  This section is removed and replaced by the program -->
    <div id="detail_line_text" style="z-index:3;clip:rect(0px,768px,17px,0px);top:@TOPDpx;left:15px;width:768px;height:17px;"></div>
    <div id="detail_text_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:16px;width:760px;height:15px;"><span class="std_text">@DETTEXT</span></div>
    <!-- D2X End of Detail text line -->
    @DETAILLINE
    <div id="footer_main" style="z-index:3;clip:rect(0px,768px,77px,0px);top:1010px;left:15px;width:768px;height:96px;border-radius: 5px;border-color:#000000;border-style:solid;border-width:1px;"></div>
    <div id="footer_text_data" class="std_div" nowrap="true" style="z-index:25;top:1015px;left:31px;width:768px;height:15px;"><span class="std_text">@SOH2TEXT</span></div>
    <div id="footer_totalshipped_title" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:31px;width:38px;height:15px;">
        <table width="38px" border="0" cellpadding="0" cellspacing="0">
            <td align="left"><span class="item_bold_sm">TSHP:</span></td>
        </table>
    </div>
    <div id="footer_weborderid_data" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:127px;width:110px;height:15px;"><span class="std_text">@CUSORDREF_0</span></div>
    <div id="footer_timeprinted_data" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:671px;width:64px;height:15px;"><span class="std_text">@TIMEPRINT</span></div>
    <div id="footer_dateprinted_data" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:247px;width:68px;height:15px;"><span class="std_text">@DATEPRINT</span></div>
    <div id="footer_cusstomerid_data" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:575px;width:74px;height:15px;"><span class="std_text">@CUSTOMERID</span></div>
    <div id="footer_totalshipped_data" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:71px;width:42px;height:15px;text-align:right;"><span class="std_text">@TOTLINES</span></div>
    <div id="footer_bottom" style="z-index:3;clip:rect(0px,768px,16px,0px);top:1052px;left:15px;width:768px;height:16px;"></div>
    <div id="footer_shipid_data" class="std_div" nowrap="true" style="z-index:25;top:1052px;left:314px;width:92px;height:16px;"><span class="std_text">@SHIPPINGID</span></div>
    <div id="footer_batchid_data" class="std_div" nowrap="true" style="z-index:25;top:1052px;left:559px;width:200px;height:16px;"><span class="hdr_std_text">@BATCHID</span></div>
</BODY>
</HTML>

div{
位置:绝对位置;
z指数:25
}
a{
文本装饰:无
}
img{
边框样式:无;
边框宽度:0
}
.相对容器{
位置:相对位置;
}
.街区{
高度:12px;
宽度:220px;
显示:块;
}
.亲戚{
位置:相对位置;
}
.标准文本{
字号:8pt;
颜色:#000000;
字体系列:Arial;
字体大小:正常;
}
.tote_文本{
字号:18pt;
颜色:#000000;
字体系列:Arial;
字体大小:粗体;
}
.acc_文本{
字号:18pt;
颜色:#000000;
字体系列:Arial;
字体大小:粗体;
}
.hdr\u标准文本{
字号:9pt;
颜色:#000000;
字体系列:Arial;
字体大小:正常;
}
.hdr\u粗体\u斜体{
字号:9pt;
颜色:#000000;
字体系列:Arial;
字体大小:粗体;
字体:斜体;
}
.hdr\u标题\u文本{
字号:6pt;
颜色:#000000;
字体系列:Arial;
字体大小:正常;
}
.hdr_条码{
字体大小:30磅;
颜色:#000000;
字体系列:“自由条码39”;
字体大小:正常;
}
.hdr_非_条形码{
字号:19pt;
颜色:#000000;
字体系列:《世纪教科书》;
字体大小:正常;
}
.hdr_特别1{
字号:9pt;
颜色:#ffffff;
字体系列:Arial;
字体大小:正常;
}
.dtl\U hdr\U顶部{
顶部:574px;
}
.hdr\u addr\u top{
顶部:386px;
}
.itm_hdr_文本{
字号:7pt;
颜色:#000000;
字体系列:Arial;
字体大小:粗体;
}
.item_bold_sm{
字号:10pt;
颜色:#000000;
字体系列:Arial;
字体大小:粗体;
}
.项目(sm){
字号:10pt;
颜色:#000000;
字体系列:Arial;
字体大小:正常;
}
.项目\粗体\ lg{
字号:11pt;
颜色:#000000;
字体系列:Arial;
字体大小:粗体;
}
.std_分区{
边框颜色:#000000;
边框左宽度:0;
右边框宽度:0;
边框顶部宽度:0;
边框底宽:0;
}
@页面{
页边距顶部:0pt;
左边距:0pt;
右边距:0pt;
边缘底部:0pt;
}
本节有意留白
@伊斯卡鲁埃尔
@CUSORDREF_0
@CUSORDREF_0
@DIVBILLTOADDRESS
销售订单编号:
@销售订单
装船日期
@交货日期
卖给
运船到
手提袋#
<HTML>
<HEAD>
    <META NAME="Author" CONTENT="Crystal Reports 14.0">
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
    <link href='https://fonts.googleapis.com/css?family=Libre Barcode 39' rel='stylesheet'>
</HEAD>
<BODY>
    <style>
        div {
            position: absolute;
            z-index: 25
        }

        a {
            text-decoration: none
        }

            a img {
                border-style: none;
                border-width: 0
            }

        .relativeContainer {
            position: relative;
        }

        .block {
            height: 12px;
            width: 220px;
            display: block;
        }

        .relative {
            position: relative;
        }

        .std_text {
            font-size: 8pt;
            color: #000000;
            font-family: Arial;
            font-weight: normal;
        }

        .tote_text {
            font-size: 18pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
        }

        .acc_text {
            font-size: 18pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
        }

        .hdr_std_text {
            font-size: 9pt;
            color: #000000;
            font-family: Arial;
            font-weight: normal;
        }

        .hdr_bold_italic {
            font-size: 9pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
            font-style: italic;
        }

        .hdr_title_text {
            font-size: 6pt;
            color: #000000;
            font-family: Arial;
            font-weight: normal;
        }

        .hdr_barcode {
            font-size: 30pt;
            color: #000000;
            font-family: 'Libre Barcode 39';
            font-weight: normal;
        }

        .hdr_non_barcode {
            font-size: 19pt;
            color: #000000;
            font-family: 'Century Schoolbook';
            font-weight: normal;
        }

        .hdr_special1 {
            font-size: 9pt;
            color: #ffffff;
            font-family: Arial;
            font-weight: normal;
        }

        .dtl_hdr_top {
            top: 574px;
        }

        .hdr_addr_top {
            top: 386px;
        }

        .itm_hdr_text {
            font-size: 7pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
        }

        .item_bold_sm {
            font-size: 10pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
        }

        .item_sm {
            font-size: 10pt;
            color: #000000;
            font-family: Arial;
            font-weight: normal;
        }

        .item_bold_lg {
            font-size: 11pt;
            color: #000000;
            font-family: Arial;
            font-weight: bold;
        }

        .std_div {
            border-color: #000000;
            border-left-width: 0;
            border-right-width: 0;
            border-top-width: 0;
            border-bottom-width: 0;
        }

        @page {
            margin-top: 0pt;
            margin-left: 0pt;
            margin-right: 0pt;
            margin-bottom: 0pt;
        }
    </style>
    <div id="hdr_second_page" class="std_div" nowrap="true" style="z-index:25;top:230px;left:200px;width:400px;height:32px;@HDRSHOW"><span class="item_bold_lg">THIS SECTION LEFT INTENTIONALLY BLANK</span></div>
    <div id="hdr_firstpage" style="z-index:3;top:0;left:0;@HDRCLEAR;">
        <div id="hdr_main" style="z-index:3;clip:rect(0px,768px,432px,0px);top:60px;left:15px;width:768px;height:432px;"></div>
        <div id="hdr_addressinfo_header" style="z-index:10;top:384px;left:224px;width:552px;height:17px;border-radius: 5px; border-color:#000000;border-style:solid;border-width:1px;background-color:#c0c0c0;layer-background-color:#c0c0c0;"></div>
        <!-- this section creates all the vertical lines for the grids -->
        <div id="hdr_spacer4" style="z-index:15;top:372px;left:23px;border-color:#000000;border-style:dotted;border-width:0px;border-top-width:1px;width:738px;"></div>
        <div id="hdr_spacer3" style="z-index:15;top:384px;left:407px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,94px,0px);height:94px;"></div>
        <div id="hdr_spacer2" style="z-index:15;top:384px;left:587px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,94px,0px);height:94px;"></div>
        <div id="hdr_spacer1" style="z-index:15;top:68px;left:400px;border-color:#000000;border-style:dotted;border-width:0px;border-left-width:1px;clip:rect(0px,1px,304px,0px);height:304px;"></div>
        <div id="middle_spacer2" style="z-index:15;top:492px;left:95px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,78px,0px);height:78px;"></div>
        <div id="middle_spacer1" style="z-index:15;top:492px;left:375px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,78px,0px);height:78px;"></div>
        <!-- end spacer section -->
        <div id="hdr_carousel" class="std_div" nowrap="true" style="z-index:25;top:64px;left:23px;width:50px;height:16px;"><span class="std_text">@ISCAROUSEL</span></div>
        <div id="hdr_weborderid_left_data" class="std_div" nowrap="true" style="z-index:25;top:132px;left:271px;width:114px;height:16px;"><span class="std_text">@CUSORDREF_0</span></div>
        <div id="hdr_weborderid_right_data" class="std_div" nowrap="true" style="z-index:25;top:132px;left:655px;width:114px;height:16px;"><span class="std_text">@CUSORDREF_0</span></div>
        <div id="hdr_soldto_data" class="std_div" nowrap="true" style="z-index:25;top:404px;left:231px;width:177px;height:75px;">
            @DIVBILLTOADDRESS
        </div>
        <div id="hdr_salesorder_title" class="std_div" nowrap="true" style="z-index:25;top:444px;left:19px;width:133px;height:16px;"><span class="hdr_bold_italic">Sales Order Number:</span></div>
        <div id="hdr_salesorder_data" class="std_div" nowrap="true" style="z-index:25;top:463px;left:19px;width:133px;height:17px;"><span class="hdr_std_text">@SALESORDER</span></div>
        <div id="hdr_shipdate_title" class="std_div" nowrap="true" style="z-index:25;top:444px;left:153px;width:67px;height:17px;"><span class="hdr_bold_italic">Ship Date</span></div>
        <div id="hdr_shipdate" class="std_div" nowrap="true" style="z-index:25;top:463px;left:153px;width:72px;height:17px;"><span class="hdr_std_text">@SHIPDATE</span></div>
        <div id="hdr_address_info" style="z-index:10;top:384px;left:224px;width:552px;height:92px;border-radius: 5px;border-color:#000000;border-style:solid;border-width:1px;"></div>
        <div id="hdr_Address_header1" class="std_div hdr_addr_top" nowrap="true" style="z-index:25;left:281px;width:82px;height:13px;"><span class="hdr_title_text">SOLD TO</span></div>
        <div id="hdr_Address_header2" class="std_div hdr_addr_top" nowrap="true" style="z-index:25;left:448px;width:82px;height:13px;"><span class="hdr_title_text">SHIP TO</span></div>
        <div id="hdr_Address_header3" class="std_div hdr_addr_top" nowrap="true" style="z-index:25;left:605px;width:82px;height:13px;"><span class="hdr_title_text">TOTE #</span></div>
        <div id="hdr_shipTo_right_data" class="std_div" nowrap="true" style="z-index:25;top:150px;left:550px;width:220px;height:83px;">
            @DIVSHIPTOADDRESS
        </div>
        <div id="hdr_shipid_barcode_left_data" class="std_div" nowrap="true" style="z-index:25;top:268px;left:167px;width:133px;height:12px;"><span class="hdr_title_text">@SHIPPINGID</span></div>
        <div id="hdr_shipid_barcode_right_data" class="std_div" nowrap="true" style="z-index:25;top:268px;left:551px;width:133px;height:12px;"><span class="hdr_title_text">@SHIPPINGID</span></div>
        <div id="hdr_custid_barcode_right_data" class="std_div" nowrap="true" style="z-index:25;top:268px;left:695px;width:80px;height:12px;"><span class="hdr_title_text">@CUSTOMERID</span></div>
        <div id="hdr_custid_barcode_left_data" class="std_div" nowrap="true" style="z-index:25;top:268px;left:319px;width:80px;height:12px;"><span class="hdr_title_text">@CUSTOMERID</span></div>
        <div id="hdr_operator_data" class="std_div" nowrap="true" style="z-index:25;top:459px;left:593px;width:75px;height:17px;"><span class="std_text">OPR = @OPR</span></div>
        <div id="hdr_pod_data" class="std_div" nowrap="true" style="z-index:25;top:459px;left:679px;width:75px;height:17px;"><span class="std_text">POD = @POD</span></div>
        <div id="hdr_tote_data" class="std_div" nowrap="true" style="z-index:25;top:425px;left:630px;width:100px;height:25px;"><span class="tote_text">@TOTE</span></div>
        <div id="hdr_barcode_left_data" class="std_div" nowrap="true" style="z-index:25;top:230px;left:167px;width:228px;height:32px;"><span class="hdr_@NONbarcode">@BARSHIPPINGID</span></div>
        <div id="hdr_barcode_right_data" class="std_div" nowrap="true" style="z-index:25;top:230px;left:551px;width:228px;height:32px;"><span class="hdr_@NONbarcode">@BARSHIPPINGID</span></div>
        <div id="hdr_shipTo_left_data" class="std_div relativeContainer" nowrap="true" style="z-index:25;top:150px;left:166px;width:220px;height:83px;">
            @DIVSHIPTOADDRESS
        </div>
        <div id="hdr_shipto_data" class="std_div" nowrap="true" style="z-index:25;top:403px;left:412px;width:172px;height:73px;">
            @DIVSHIPTOADDRESS
        </div>
        <div id="hdr_batchId_data" class="std_div" nowrap="true" style="z-index:25;top:409px;left:599px;width:167px;height:17px;"><span class="hdr_std_text">@BATCHID</span></div>
        <div id="logo_left" class="std_div" nowrap="true" style="z-index:25;top:@TOPTpx;left:@LEFTLpx;width:@TOPWpx;height:@TOPHpx;"><img src="C:\temp\PickTicketHTML\images\logo_@LOGO.png" border="0" width="@TOPWpx" height="@TOPHpx"></div>
        <div id="logo_right" class="std_div" nowrap="true" style="z-index:25;top:@TOPTpx;left:@LEFTRpx;width:@TOPWpx;height:@TOPHpx;"><img src="C:\temp\PickTicketHTML\images\logo_@LOGO.png" border="0" width="@TOPWpx" height="@TOPHpx"></div>
        <div id="logo_middle" class="std_div" nowrap="true" style="z-index:25;top:@TOPMpx;left:@LEFTMpx;width:@MIDWpx;height:@MIDHpx;"><img src="C:\temp\PickTicketHTML\images\logo_@LOGO.png" border="0" width="@MIDWpx" height="@MIDHpx"></div>
        <div id="agro_left" class="std_div" nowrap="true" style="z-index:24;top:124px;left:111px;width:151px;height:21px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\agro_message.png" border="0" width="151px" height="21px"></div>
        <div id="agro_right" class="std_div" nowrap="true" style="z-index:24;top:124px;left:495px;width:147px;height:18px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\agro_message.png" border="0" width="147px" height="18px"></div>
        <div id="inspection_left" class="std_div" nowrap="true" style="z-index:-1;top:150px;left:23px;width:134px;height:134px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\inspection_sticker.png" border="0" width="134px" height="134px"></div>
        <div id="inspection_right" class="std_div" nowrap="true" style="z-index:-1;top:150px;left:407px;width:134px;height:134px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\inspection_sticker.png" border="0" width="134px" height="134px"></div>
        <div id="meets_left" class="std_div" nowrap="true" style="z-index:25;top:284px;left:19px;width:376px;height:82px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\meets_standards.png" border="0" width="376px" height="82px"></div>
        <div id="meets_right" class="std_div" nowrap="true" style="z-index:25;top:284px;left:403px;width:376px;height:82px; display:@DISPLAY;"><img src="C:\temp\PickTicketHTML\images\meets_standards.png" border="0" width="376px" height="82px"></div>
        <div id="middle_main" style="z-index:10;top:492px;left:17px;width:758px;height:75px;border-radius: 5px;border-color:#000000;border-style:solid;border-width:1px;"></div>
        <div id="middle_space" style="z-index:3;clip:rect(0px,768px,77px,0px);top:492px;left:15px;width:768px;height:77px;"></div>
        <div id="middle_canada_data" class="std_div" nowrap="true" style="z-index:25;top:514px;left:25px;width:48px;height:16px;"><span class="hdr_special1">@CAN</span></div>
        <div id="middle_state_data" class="std_div" nowrap="true" style="z-index:25;top:547px;left:25px;width:48px;height:25px;"><span class="mid_special">@STATE</span></div>
        <div id="middle_acc_data" class="std_div" nowrap="true" style="z-index:25;top:495px;left:25px;width:48px;height:30px;"><span class="acc_text">@ACC</span></div>
        <div id="middle_text1_data" class="std_div" nowrap="true" style="z-index:25;top:495px;left:378px;width:390px;height:70px;"><span class="std_text">@SOH1TEXT</span></div>
        <div id="middle_text2_data" class="std_div" nowrap="true" style="z-index:25;top:495px;left:97px;width:390px;height:70px;"><span class="std_text">@SOH2TEXT</span></div>
    </div>
    <div id="detail_header_titles" style="z-index:10;top:569px;left:15px;width:759px;height:24px;border-radius: 5px;border-color:#000000;border-style:solid;border-width:1px;background-color:#c0c0c0;layer-background-color:#c0c0c0;"></div>
    <div id="detail_headers" style="z-index:3;clip:rect(0px,768px,28px,0px);top:569px;left:15px;width:768px;height:28px;"></div>
    <div id="detail_spacer5" style="z-index:15;top:569px;left:95px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,26px,0px);height:26px;" /></div>
    <div id="detail_space4" style="z-index:15;top:569px;left:167px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,26px,0px);height:26px;"></div>
    <div id="detail_space3" style="z-index:15;top:569px;left:247px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,26px,0px);height:26px;"></div>
    <div id="detail_space2" style="z-index:15;top:569px;left:375px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,26px,0px);height:26px;"></div>
    <div id="detail_space1" style="z-index:15;top:569px;left:695px;border-color:#000000;border-style:solid;border-width:0px;border-left-width:1px;clip:rect(0px,1px,26px,0px);height:26px;"></div>
    <div id="detail_hdr_location" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:27px;width:52px;height:16px;"><span class="itm_hdr_text">Location</span></div>
    <div id="detail_hdr_shipped" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:103px;width:49px;height:16px;"><span class="itm_hdr_text">Shipped</span></div>
    <div id="detail_hdr_backord" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:183px;width:45px;height:16px;"><span class="itm_hdr_text">Bckord</span></div>
    <div id="detail_hdr_itemnumber" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:255px;width:112px;height:16px;"><span class="itm_hdr_text">Item&nbsp;Number</span></div>
    <div id="detail_hdr_description" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:431px;width:180px;height:16px;"><span class="itm_hdr_text">Description</span></div>
    <div id="detail_hdr_origin" class="std_div dtl_hdr_top" nowrap="true" style="z-index:25;left:703px;width:48px;height:16px;"><span class="itm_hdr_text">Origin</span></div>
    <!-- D1 Start of Detail template, do not remove these comments.  This section is removed and replaced by the program -->
    <div id="detail_line" style="z-index:3;clip:rect(0px,768px,17px,0px);top:@TOPDpx;left:15px;width:768px;height:17px;"></div>
    <div id="detail_location_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:16px;width:79px;height:15px;"><span class="item_bold_lg">@LOCATION</span></div>
    <div id="detail_qty_shipped_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:103px;width:64px;height:16px;text-align:center;"><span class="item_bold_lg">@QTYSHIP</span></div>
    <div id="detail_qty_backord_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:175px;width:64px;height:16px;text-align:center;"><span class="item_bold_lg">@QTYBACKORD</span></div>
    <div id="detail_itemnumber_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:263px;width:103px;height:16px;"><span class="item_bold_sm">@ITEMNUM</span></div>
    <div id="detail_description_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:375px;width:320px;height:16px;"><span class="item_sm">@DESCRIPTION</span></div>
    <div id="detail_origin_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:695px;width:80px;height:16px;"><span class="item_sm">@ORIGIN    @OSTATE</span></div>
    <!-- D1X End of Detail template -->
    <!-- D2 start of detail text line, do not remove these comments.  This section is removed and replaced by the program -->
    <div id="detail_line_text" style="z-index:3;clip:rect(0px,768px,17px,0px);top:@TOPDpx;left:15px;width:768px;height:17px;"></div>
    <div id="detail_text_data" class="std_div" nowrap="true" style="z-index:25;top:@TOPDpx;left:16px;width:760px;height:15px;"><span class="std_text">@DETTEXT</span></div>
    <!-- D2X End of Detail text line -->
    @DETAILLINE
    <div id="footer_main" style="z-index:3;clip:rect(0px,768px,77px,0px);top:1010px;left:15px;width:768px;height:96px;border-radius: 5px;border-color:#000000;border-style:solid;border-width:1px;"></div>
    <div id="footer_text_data" class="std_div" nowrap="true" style="z-index:25;top:1015px;left:31px;width:768px;height:15px;"><span class="std_text">@SOH2TEXT</span></div>
    <div id="footer_totalshipped_title" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:31px;width:38px;height:15px;">
        <table width="38px" border="0" cellpadding="0" cellspacing="0">
            <td align="left"><span class="item_bold_sm">TSHP:</span></td>
        </table>
    </div>
    <div id="footer_weborderid_data" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:127px;width:110px;height:15px;"><span class="std_text">@CUSORDREF_0</span></div>
    <div id="footer_timeprinted_data" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:671px;width:64px;height:15px;"><span class="std_text">@TIMEPRINT</span></div>
    <div id="footer_dateprinted_data" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:247px;width:68px;height:15px;"><span class="std_text">@DATEPRINT</span></div>
    <div id="footer_cusstomerid_data" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:575px;width:74px;height:15px;"><span class="std_text">@CUSTOMERID</span></div>
    <div id="footer_totalshipped_data" class="std_div" nowrap="true" style="z-index:25;top:1032px;left:71px;width:42px;height:15px;text-align:right;"><span class="std_text">@TOTLINES</span></div>
    <div id="footer_bottom" style="z-index:3;clip:rect(0px,768px,16px,0px);top:1052px;left:15px;width:768px;height:16px;"></div>
    <div id="footer_shipid_data" class="std_div" nowrap="true" style="z-index:25;top:1052px;left:314px;width:92px;height:16px;"><span class="std_text">@SHIPPINGID</span></div>
    <div id="footer_batchid_data" class="std_div" nowrap="true" style="z-index:25;top:1052px;left:559px;width:200px;height:16px;"><span class="hdr_std_text">@BATCHID</span></div>
</BODY>
</HTML>
<!DOCTYPE html><html lang="en">             <!-- here other meta's -->
<link rel="stylesheet" href=" ..."          <!-- basic css file -->

    <!-- for printer only, it must be the last one css to overwrite other css-->
<link media="print" rel="stylesheet" href="print.css">
div{ position: static}      /* or relative - test, your css is too much complicated to guess what you need */

.never{ display: none}      /* for elements you never want to print */
.always{ position: fixed}   /* for elements you want to print on each page */