打印具有绝对位置的多页HTML

问题描述

我的任务是转换一个Crystal Report,该Crystal Report可以将选择票打印为HTML(和/或PDF)报告。部分原因是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文件中,并使用webbrowser控件打印出全部页面,但是绝对的顶部和左侧基本上使所有页面彼此打印。

我研究了媒体CSS样式

@media print {
  .page-breaker { 
    page-break-before: always;
  }
}

但绝对值覆盖分页符。除了浏览一个非常复杂的html文件并为每个页面替换顶部和左侧之外,还有没有办法告诉打印/浏览器每个分页符都是新的顶部?如果我没有正确获得每页的偏移量,采用替代方法会让我担心。

我现在要工作的是:

  • 打开模板并拆分各部分
  • 获取数据
  • 遍历数据种子数据以替换占位符。
    • 使用iText7将html转换为PDF
    • 使用iText7将页面合并到主pdf文档
  • 处理完所有数据后
  • 保存文档
  • 使用Sumantra PDF打开文档
  • 使用Sumantra PDF打印文档。

我担心的是,当我运行CR报告并保存PDF时,文件大小几乎比iText7文件小2/3 rds。该过程可能需要处理超过1000页以上的票证,而我担心网络和打印机的限额会爆炸。直接打印HTML似乎比PDF更有效,文件更小,对系统的影响更小,但我始终坚持绝对上下浮动。

由于与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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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>

解决方法

此模板是一场噩梦...
广告提示: 您必须覆盖absolute-多亏了它应该起作用的级联:

<!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">

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 */

另一种方法-将所需的声明放在页面<style> ...</style>的{​​{1}}的底部-它必须是最后一个CSS声明。 我使用了示例类,但是您可以在head这样的3个区域中关闭div或通过id直接选择它们,然后在CSS(文件或样式部分)中设置它们的打印属性。
您可以为任何页面元素设置打印属性,无需手动构建“特殊”版本,只需对现有页面进行完整的print.css设置即可-通过类或id进行css选择的排除等。此css文件将仅用于打印,并且仅执行您所订购的内容。
header,main,footer通常有效,但只是中断所选行的页面,没有其他作用。

...此模板是一场噩梦Validator w3c

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...