pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurent Yaish <laure...@gmail.com>
Subject Re: Multi-page overlay with OverlayPDF in PDFBox 1.8.2
Date Sun, 31 Aug 2014 00:45:38 GMT
So I looked at the code and it does look like there is no way to do this
with the new implementation.
Using the -even, -odd or -page options could work for a small document, but
we wouldn't be able to overlay a 999 page PDF with a 3 page template.

What if we added something like a -useAllOverlayPages parameter (it's a bad
name, I know)  that would then populate specificPageOverlayPage with all
the pages available from the defaultOverlay and then just do something like:

int usePageNum = pageNumber % specificPageOverlayPage.size(); if
(useAllOverlayPages && specificPageOverlayPage.containsKey(usePageNum)) {
layoutPage = specificPageOverlayPage.get(usePageNum); }

in the overlayPage() method.

I'd try it, but don't code in Java and it probably would take me a while
just to get the thing to compile... :)




On Sat, Aug 30, 2014 at 2:37 PM, Laurent Yaish <laurenty@gmail.com> wrote:

> Hi,
> I'm trying to overlay a 12 page PDF with a 2 page "template".
> With the old Overlay implementation it would repeat the template 6 times:
> page 1, page 2, page 1...
> I tried several of the options documented, but couldn't get it to work
> like it used to.
> Does the new implementation support this?
> I'm only using 1.8.2 because the code appears to be broken in the latest
> 1.8.6.
> Thanks
> Laurent

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message