PHP - 纯文本分页符
我正在创建一个可以执行多种格式的导出系统,其中之一是纯文本。我希望打印文档时,带有列名称的标题出现在每页的顶部。有没有办法可以强制以纯文本形式分页。我只在 HTML/CSS 中找到了实现此目的的方法。文件的输出格式如下所示:
+----------+----------------+
| Column 1 | Column 2 |
+----------+----------------+
| Data | More Data |
+----------+----------------+
| Data | More Data |
+----------+----------------+
| Data | More Data |
+----------+----------------+
I am creating an export system that can do multiple formats and one of them is plain text. I want the headers with the column name to appear at the top of each page when the document is printed. Is there a way I could force a page break in plain text. I have only found ways to to this in HTML/CSS. The output format for the file looks something like this:
+----------+----------------+
| Column 1 | Column 2 |
+----------+----------------+
| Data | More Data |
+----------+----------------+
| Data | More Data |
+----------+----------------+
| Data | More Data |
+----------+----------------+
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试发送 ASCII 换页,即字符 0xC。如果文本直接发送到打印机,则该字符将强制打印机弹出页面。
You could try sending an ASCII form feed which is character 0xC. If the text is sent directly to a printer, then that character will force the printer to eject the page.