PDF:插入一行文本到现有的PDF文件 [英] PDF: insert a line of text into an existing PDF file

查看:1058
本文介绍了PDF:插入一行文本到现有的PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个PDF文件,我想对所有页面的页脚添加(除了前两个)纯文本的线(未标识或东西一样)。

I have a PDF file and I wish to add on the footer of all pages (except the first two) a line of plain text (not a logo or something alike).

有没有任何人有怎样可以做到这一点的例子(在任何语言)?

Did anyone has an example of how this can be done (in any language)?

更新:
原始的PDF用的scribus量身定做的,我对它有完全的控制。所以,如果它容易使一个查找和放大器;替换操作,那也没关系。

Update: The original PDF was made with Scribus and I have total control of it. So if it easier to make a find&replace operation, that's fine too.

推荐答案

如果页脚是由一个位置(即以毫米为单位,例如指定)的定义,你可以用自己喜欢的语言(的 TeX的 PHP FPDF ,的后记,...)来渲染PDF包含两行,然后使用的 PDFTK

If "the footer" is defined by a position (i.e. specified in millimeters for example), you can just use your favorite language (TeX, PHP, FPDF, Postscript, ...) to render a PDF containing the two lines and then overlay this PDF on top of your existing PDF using pdftk.

如果你想覆盖只适用于前两页,你必须使用一个临时文件是这样的:

If you want to apply the overlay only to the first two pages, you have to use a temporary file like this:

pdftk input.pdf stamp overlay.pdf output temp.pdf
pdftk A=input.pdf B=temp.pdf cat A1-2 B3-end output result.pdf

这篇关于PDF:插入一行文本到现有的PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆