2001 JI Open Discussion Posted August 17, 2006 Share Posted August 17, 2006 By: Dan Peery - sfpeery Water Mark 2002-12-03 12:12I have a user requirement for printing a water mark. Is this possible with JasperReports? Any suggestions? By: Dan Peery - sfpeery RE: Water Mark 2002-12-03 15:14I tested this idea. The image does not display in output. By: Alex Parfenov - aparfeno RE: Water Mark 2002-12-03 12:28(not tried nor tested): Place <image> object of your watermark in page header with height of the object to be actual height of the image (which should equal height of the page), and height of the page header to be smaller (whatever the page header height actually is). For example, <pageHeader height=40>, but <image height=600>. The result should be an image that underlies all other text By: Teodor Danciu - teodord RE: Water Mark 2002-12-03 23:36 Hi, Put the image on the page footer and use a negative Y to make it go to the top of the page. Ignore the report compilation warning. I hope this helps. Teodor By: Dan Peery - sfpeery RE: Water Mark 2002-12-04 16:18Thanks Teodor, The placement is now correct and I was able to get the translucent watermark result I was looking for in HTML format. I was not able to get the translucent watermark result in PDF or JasperViewer format. Does anyone have other suggestions that will allow the text to show through the image? By: Teodor Danciu - teodord RE: Water Mark 2002-12-04 23:03 Hi, I think it is the other way around. It works in PDF and JasperViewer, but not in HTML. This is because the HTML exporter does not know how to handle overlapping elements. It places elements in a table and you cannot have two elements in the same cell. Thank you, Teodor By: Dan Peery - sfpeery RE: Water Mark 2002-12-05 10:50Info. correction: Watermark appeared to work in HTML. The text showed through on the left side of the image (I have evidence of this in a printout), but the image pushed the text over on the right due to HTML exporter not being able to handle overlapping elements as Teodor stated. I need the watermark to work in JasperView, but am unable to get the all of the text to show through the image. I am using a pink and white gif image that I downloaded from the internet that was used in a watermark sample. The text shows through the white part of the image but not the pink. In the iReport GUI all of the text shows through the image, but the PDF or JasperView output the text does not show through the pink part of the image. Maybe I just need more info on graphics. By: Teodor Danciu - teodord RE: Water Mark 2002-12-07 01:52 Hi, Oh, I see. The problem is that you cannot place the watermark on the page header because it will be ignored by the engine since it goes beyond the band bottom. It appears when you place it on the page footer, but unfortunately, the page footer is generated the last, and the watermark will be in front of all the page elements and not in the back. Is that it? I don't see a solution for the moment, but I'll keep thinking. Thank you, Teodor By: Dan Peery - sfpeery RE: Water Mark 2002-12-10 16:01I believe so! By: Dan Peery - sfpeery RE: Water Mark 2002-12-19 18:51Teodor, haven't heard anything on watermarks lately. Is something that can be done with JasperReports? Thanks. By: Dan Peery - sfpeery RE: Water Mark 2002-12-19 18:22Teodor, haven't heard anything on watermarks lately. Is something that can be done with JasperReports? Thanks. By: Teodor Danciu - teodord RE: Water Mark 2002-12-19 23:07 Hi, With the current version there is no trick good enough to obtain watermarks. We have to devise a special way to introduce them in the report design. This is on my TODO list now, but it will be implemented depending on other priorities. I hope soon enough for you to use it. Thank you, Teodor By: David Sachs - dsach1w RE: Water Mark 2002-12-21 23:13Could you generate the PDF, store it temporarily (either on disk or in memory), and then use iText? iText (http://www.lowagie.com/iText) can read and modify existing PDF files and has a built-in method to add watermarks. See http://www.lowagie.com/iText/examples/Chap0107.java. Hope that helps, David By: Dan Peery - sfpeery RE: Water Mark 2002-12-22 00:39Thanks, but I need the watermark in the JasperViewer. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now