在下面的代码中,证书是使用显示的 html 代码生成的。即,此 html 稍后转换为 pdf,依此类推。我的问题是,当打印 html 页面时,下一页打印总是纵向显示模式。任何人都可以让我知道如何通过更改 html、css 代码将其转换为横向吗
<body>
<div style='text-align:center;background-image: url(merit);background-repeat:no-repeat;width:1650px;height:900px;padding-top:340px;font-family:\"Times New Roman\";'>
<font style='font-size:90px;color:#122229;'>Certificate of merit</font><br/>
<font style='font-size:35px;color:#212219;'>Awarded to </font><br><br>
<font style='font-size:45px;color:#3f3c32;'><b>Tom</b></font><hr color='#666666' style='width:600px;'><br/><br/>
<font style='font-size:60px;color:#993399;'>for the position</font><br/>
<font style='font-size:60px;color:#3f3c32';>Mnnager </font><br/><br/>
<font style='font-size:30px;color:#564782';>12-Feb-2010</font><hr color='#fffff' style='width:400px;'><br/>
</div>
</body>
最佳答案
我相信不同的 HTML->PDF 转换器可以使用不同的方法。 IE。答案取决于您使用的 PDF 转换器。 也许使用标准的 HTML 格式就足够了,请参阅此链接: Landscape printing from HTML
关于html - 在横向模式下获取 html 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8968604/