Feature #105
1 page pdf layer in front or background of other pdf-pages
0%
Description
I would like somekind of merge function, where I have a one-page pdf (for instance with my companylogo) so that I set this in front or in the background of another pdf (which can be multipage)
an option where I can set only first page of all pages, would be welcome......
you find this kind of function, a lot also in pdf printers where can set a default background (1 page pdf) for all your printed pdf's
History
Updated by Harjo Kompagnie almost 15 years ago
It's like the watermark function, but than not with an image, but with a 1 page pdf file.
Updated by Harjo Kompagnie over 14 years ago
opensource is nice, but no communication or reaction is killing the whole open idea, IMHO.
Will try to hire a java programmer..
Updated by Scott Butler over 14 years ago
- Status changed from New to Resolved
This has already been supported in the plugin for some time now. Use the watermark function. The last argument is an array of pages you want the watermark on. If you leave it empty, it will do all pages. Usage like:
watermark(String inputFile, String image, int locationX, int locationY, boolean isOver, String[] pages)
Let me know if that isn't what you are referring to. For the image, I think a transparent PNG is probably best if you want to overlay it. othwise you can set isOver to false.
Updated by Harjo Kompagnie over 14 years ago
HI Scott, thanks for replying, the problem is that my source is not an image, but a one-page pdf file (mostly all of them vector based)
So I wondered, if it is possible to put that pdf as a watermark?
if not, than I need some function, to create an image, from that one-page pdf (preferable, set the grab resolution, to : 72, 100, 200 or 300 dpi) and grab it as png and/or gif. (jpg, will be to heavy, the end result-pdf will be to big....)
Updated by Scott Butler over 14 years ago
- Status changed from Resolved to Reopened
ok. Did some research and this is possible. Actually found a nice example here: http://pdfhacks.com/watermark/ I'll add it into the plugin after ServoyWorld.
Updated by Harjo Kompagnie about 14 years ago
Scott, wonderfull!,
I did some research too in the code, ;-) and it would be nice, that we can choose of the watermark goes under or above, the pdf.
writer.getOverContent (above: http://api.itextpdf.com/com/itextpdf/text/pdf/PdfStamper.html#getOverContent%28int%29)
writer.getUnderContent (under: http://api.itextpdf.com/com/itextpdf/text/pdf/PdfStamper.html#getUnderContent%28int%29)
Updated by Imre Tokai about 14 years ago
Harjo Kompagnie wrote:
I would like somekind of merge function, where I have a one-page pdf (for instance with my companylogo) so that I set this in front or in the background of another pdf (which can be multipage)
an option where I can set only first page of all pages, would be welcome......you find this kind of function, a lot also in pdf printers where can set a default background (1 page pdf) for all your printed pdf's
Implemented,
There is the overlay function and "Move sample" in Servoy solution demonstrates how it works