Hi everyone, First post! Hope I'm doing it right :-) I've been trying to apply a one-page overlay to specific pages in a source PDF.
At the moment, I'm reading the source and the overlay in using Loader.loadPDF() and then using the multipdf.Overlay class to first of all setInputFile() and then setOverlayPosition(). I'm constructing a Map<Integer,String> correctly (missing a couple of page numbers out) and then passing that in to overlay() - without any errors on the call. I'm then .save() ing the result of that and using close() correctly. (I'll explain why I don't just post the code in a minute!) If I do this, my resultant PDF is generated as a copy of the original, no sign of the overlay. If I do setAllPagesOverlayPDF(document), the overlay appears on every page, without missing any pages. I've also tried setDefaultOverlayPDF() with the same result. The reason I don't just post my code is that I'm trying to do this from Lucee (CFML). This hasn't been a problem when applying watermarks using a content stream, and that's all fine and lovely, so I'm 95% sure I'm calling the Java code correctly. It's just this darned Overlay stuff that doesn't seem to work! I've Googled a lot and used other examples to construct the code, so either everyone's wrong (unlikely) or I am! Does anyone have any idea as to whether I'm just not using something correctly, or if it's just not possible/not the idea in the first place? Hope someone out there in the ether can help! :-) Best wishes, -- Mike Horne