如何执行后记文件到特定的页码?

编程入门 行业动态 更新时间:2024-10-27 15:17:18
本文介绍了如何执行后记文件到特定的页码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有100行的附言文件.我正在尝试通过ghostscript将2个pdf合并为一个.我想做的是将两个pdf合并为一个,然后以以下方式应用我的Postscript代码:

I have postscript file of 100 lines. I'm trying to merge 2 pdfs in to the single one with the help of ghostscript. What I want to do is, merge both pdf into one and than apply my postscript code in following manner:

1)后记文件的前50行应仅应用于生成的pdf的第1页上

1) first 50 lines of the postscript file should be applied on only page 1 of the generated pdf

2)剩余的50行将应用于生成的pdf的第二页.

2) remaining 50 lines to be applied on the 2nd page of the generated pdf.

我已经使用以下代码来做到这一点:

I have used following code to do that:

gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf test.ps pdf_1.pdf pdf_2.pdf;

我尝试了postscript的showpage选项,但是在生成的输出pdf中插入了空白页,这不是我的要求.

I have tried showpage option of postscript, but that insert a blank page in the generated output pdf and that's not my requirement.

有人知道我该怎么做吗?

Any one knows how can I do that ?

推荐答案

您可以将PS代码分解为多个迭代.只需使用PS代码的一部分创建一个pdf,然后使用PS的其余部分生成另一个pdf.完成之后,您可以在ghost脚本的帮助下合并两个PDF并获得所需的输出.

You can break down the PS code in to multiple iteration. Just create one pdf with one part of PS code and then generate another pdf with remaining part of PS. After doing that you can merge both PDF with the help of ghost script and get the desire output.

我知道这不是一个明智的解决方案,但是暂时您可以继续这样做.

I know this is not a wise solution, but for the time you can move ahead with that.

谢谢

更多推荐

如何执行后记文件到特定的页码?

本文发布于:2023-10-29 20:27:14,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1540657.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:页码   后记   文件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!