我正试图让谷歌浏览器进行分页.
我通过一堆page-break-after: always;在Chrome中有效的网站被告知,但即使只是一个非常简单的例子,我似乎无法让它工作.有没有办法在使用chrome打印时强制分页?
我目前正在创建一个非常好的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)