简体   繁体   English

使用页码从其他PDF生成PDF

[英]Generate PDF from other PDFs with page numbers

As part of a project I'm undertaking, I need to try and merge a number of PDFs I have and place consecutive page numbers on each (which may not start from 1). 作为我正在进行的项目的一部分,我需要尝试合并我拥有的多个PDF并在每个PDF上放置连续的页码(可能不是从1开始)。 Ideally, I need to be able to call this from a Java program. 理想情况下,我需要能够从Java程序中调用它。

I know there are tools such as iText , PDFBox and Pdftk , but are these able to deal with the page numbers? 我知道有iTextPDFBoxPdftk等工具,但是这些能够处理页码吗? I have looked into them and haven't found any ability to deal with this. 我已经调查过他们并且没有找到任何处理这个问题的能力。

Are there any tools you know of that can achieve this? 你知道有什么工具可以达到这个目的吗?

Many thanks in advance 提前谢谢了

http://www.rgagnon.com/javadetails/java-0646.html example code. http://www.rgagnon.com/javadetails/java-0646.html示例代码。 you could add additional text/images/whatever using PdfContentByte from PDFWriter getDirectContent() method. 您可以使用PDFWriter getDirectContent()方法中的PdfContentByte添加其他文本/图像/任何内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM