如何使用play pdf在同一pdf文档中创建独立页面

如何使用play pdf在同一pdf文档中创建独立页面,pdf,playframework,pdf-generation,Pdf,Playframework,Pdf Generation,我正在使用play2 pdf在我的应用程序中生成pdf。我首先创建了封面,但当我尝试添加其他页面时,它已添加到同一pdf页面中。如何在同一pdf文档中创建多个页面?我还尝试在我的第一页中添加页脚,但仍然存在相同的问题 <html> <head> <style> p.serif { font-family: "Times New Roman", Times, serif; }

我正在使用play2 pdf在我的应用程序中生成pdf。我首先创建了封面,但当我尝试添加其他页面时,它已添加到同一pdf页面中。如何在同一pdf文档中创建多个页面?我还尝试在我的第一页中添加页脚,但仍然存在相同的问题

<html>
    <head>
        <style>
        p.serif {
        font-family: "Times New Roman", Times, serif;
        }
        p.sansserif {
        font-family: Arial, Helvetica, sans-serif;
        }
        </style>
    </head>
    <body>
        this is a test
        <div style="position:absolute; bottom:0;right:0;margin:24px;">by bSuccess</div>
    </body>
</html>

p、 衬线{
字体系列:“泰晤士报新罗马”,泰晤士报,衬线;
}
p、 桑塞里夫{
字体系列:Arial、Helvetica、无衬线字体;
}
这是一个测试
成功

对于页眉和页脚,可以使用css分页媒体模块()

例如:

<html>
    <head>
        <style>
            @@page {
                @@bottom-right {
                    content: "by bSuccess";
                    font-size: 14px;
                }
            }
        </style>
    </head>
    <body>
        this is a test
    </body>
</html>
<html>
    <head>
        <style>
            @@page {
                @@bottom-right {
                    content: "by bSuccess";
                    font-size: 14px;
                }
            }
        </style>
    </head>
    <body>
        <div>this is a test</div>
        <p style="page-break-after:always;"></p>
        <div>testing page break</div>
    </body>
</html>

@@页面{
@@右下角{
内容:“通过成功”;
字体大小:14px;
}
}
这是一个测试
对于分页符,可以使用css分页符属性()

例如:

<html>
    <head>
        <style>
            @@page {
                @@bottom-right {
                    content: "by bSuccess";
                    font-size: 14px;
                }
            }
        </style>
    </head>
    <body>
        this is a test
    </body>
</html>
<html>
    <head>
        <style>
            @@page {
                @@bottom-right {
                    content: "by bSuccess";
                    font-size: 14px;
                }
            }
        </style>
    </head>
    <body>
        <div>this is a test</div>
        <p style="page-break-after:always;"></p>
        <div>testing page break</div>
    </body>
</html>

@@页面{
@@右下角{
内容:“通过成功”;
字体大小:14px;
}
}
这是一个测试

测试分页符
非常感谢您的帮助!!