相关疑难解决方法(0)

谷歌Chrome打印分页

我正试图让谷歌浏览器进行分页.

我通过一堆page-break-after: always;在Chrome中有效的网站被告知,但即使只是一个非常简单的例子,我似乎无法让它工作.有没有办法在使用chrome打印时强制分页?

css printing google-chrome

106
推荐指数
6
解决办法
13万
查看次数

python-pdfkit(wkhtmltopdf)TOC溢出

我目前正在创建一个非常好的PDF.它在技术上没有任何问题.但是,TOC很难看.

TOC是通过xsl生成的,xsl通过jinja2传递给页面顶部的简单细节.我修改了XSL以精确匹配客户的品牌和设计.然而,该名单的高度不断增加.

这是当前的结果(很抱歉模糊文本)你可以看到toc在新页面上的正确位置拾取,但似乎没有办法在新页面上应用上边距: 在此输入图像描述

代码: 这是xsl:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
            xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
            xmlns:outline="http://wkhtmltopdf.org/outline"
            xmlns="http://www.w3.org/1999/xhtml">
  <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
          doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
          indent="yes" />
  <xsl:template match="outline:outline">
    <html>
      <head>
        <title>Table of Contents</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <style>

      body{
        background-color: #fff;
        margin-left: 0px;
        margin-top: 0px;
        color:#1e1e1e;
        font-family: arial, verdana,sans-serif;
        font-size: 90px;
      }
      .contentSection{
        position:relative;
        height:3200px;
        width:6100px;
      }
      .profile{
        position:absolute;
        display:inline-block;
        top:200px !important;
      }


      h1 {
        text-align: left;
        font-size: 70px;
        font-family: arial;
        color: #ef882d;
      }
      li {
        border-bottom: 1px dashed rgb(45,117,183);
      }
      span {float: …
Run Code Online (Sandbox Code Playgroud)

python xslt xsl-fo wkhtmltopdf python-pdfkit

27
推荐指数
1
解决办法
1246
查看次数