Project

General

Profile

Feature #105

1 page pdf layer in front or background of other pdf-pages

Added by Harjo Kompagnie almost 14 years ago. Updated about 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Start date:
07/28/2010
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

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

#1

Updated by Harjo Kompagnie almost 14 years ago

It's like the watermark function, but than not with an image, but with a 1 page pdf file.

#2

Updated by Harjo Kompagnie over 13 years ago

Can we expect any activity on the pdf pro plugin?

#3

Updated by Harjo Kompagnie over 13 years ago

No one, looking here? simple yes or no?

#4

Updated by Harjo Kompagnie over 13 years ago

opensource is nice, but no communication or reaction is killing the whole open idea, IMHO.
Will try to hire a java programmer..

#5

Updated by Scott Butler over 13 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.

#6

Updated by Harjo Kompagnie over 13 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....)

#7

Updated by Scott Butler over 13 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.

#8

Updated by Harjo Kompagnie over 13 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)

#9

Updated by Imre Tokai about 13 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

#10

Updated by Imre Tokai about 13 years ago

  • Status changed from Reopened to Resolved

Also available in: Atom PDF