zoukankan      html  css  js  c++  java
  • xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

    print pdf bug & DOCTYPE

    OK

    with <!DOCTYPE html>

    
    <!DOCTYPE html>
    <html lang="zh-Hans">
    
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <meta name="author" content="xgqfrms">
        <meta name="generator" content="VS code">
        <title></title>
    </head>
    
    <body>
        <section>
            <h1>
                <a href="https://feiqa.xgqfrms.xyz/index.html"></a>
            </h1>
        </section>
    </body>
    
    </html>
    
    

    error

    no <!DOCTYPE html>

    
    <html lang="zh-Hans">
    
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <meta name="author" content="xgqfrms">
        <meta name="generator" content="VS code">
        <title></title>
    </head>
    
    <body>
        <section>
            <h1>
                <a href="https://feiqa.xgqfrms.xyz/index.html"></a>
            </h1>
        </section>
    </body>
    
    </html>
    
    

    
    let html = document.querySelector(`html`);
    // let text = html.innerHTML;
    
    text += `
        <style>
            @media print {
                @page {
                    margin: 0;
                }
            }
        </style>
    `;
    
    
    
    @media print {
      @page { margin: 0; }
      body { margin: 1.6cm; }
    }
    
    

    https://stackoverflow.com/questions/46077392/additional-options-in-chrome-headless-print-to-pdf

    ?

    refs



    ©xgqfrms 2012-2020

    www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


  • 相关阅读:
    Storm 中drpc调用
    yarn下资源配置
    java 中 Stringbuff append源代码浅析
    总结的MR中连接操作
    hive中使用rcfile
    MapFile
    HDFS副本存放读取
    zoj 1967 Fiber Network/poj 2570
    zoj 2027 Travelling Fee
    poj 1742 Coins
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/9732276.html
Copyright © 2011-2022 走看看