html - 在横向模式下获取 html 页面

标签 html css

在下面的代码中,证书是使用显示的 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/

相关文章:

javascript - 浏览器窗口中的 fabric.js : How do I horizontally center fabric. Canvas()?

html - 模糊除悬停元素之外的所有元素

css - css 样式表层次结构的重要性

html - 如何在 css 中设置我想要的字体系列?

java - 制作网页表格 : Java vs HTML

javascript - 颜色仅在激活随机按钮时改变

javascript - 在 html 元素中显示数据

jquery - 使列等高(上下)

javascript - 子菜单在鼠标悬停时断开连接,也无法导航到子菜单

html - 是否可以使用纯 css 在单页网站上突出显示 anchor 链接?