I know I can use PDFBox to merge multiple PDF's into one PDF. But is there a way to merge pages? For example, I have a header in PDF and want it to be inserted to the top of the first page of the combined PDF and push everything down. Is there a way to do it using PDFBox API?
相关问题
- Possible bug with load() and parse() methods in PD
- Calculating the exact positions of(Td, TD, Tm, cm,
- Java PDFBox 向PDF文件中写入图片
- PDFBox: extract image location (wrong x and y)
- Printing Chinese characters in pdfbox
相关文章
- Java PDFBox 向PDF文件中写入图片
- Read pdf uploadstream one page at a time with java
- Text is reverse in generated pdf
- How To read control characters in a pdf using java
- In PDFBox, how to create a link annotation with “r
- Finding javascript code in PDF using Apache PDFBox
- Java PDFBox - Reading and modifying a pdf with spe
- Adding page numbers using PDFBox
Here is some code that works to copy two files into a merged one with multiple copies of each one. It copies by pages. It's something I got using the information in the answer to this question: Can duplicating a pdf with PDFBox be small like with iText?
So all you have to do is to make one copy only of the first page of doc1 and one copy only of all pages of doc2. There's a comment where you'll have to make a change to leave off some pages.