1. Youna Lau
  2. Elevate Discussion
  3. Thursday, 25 August 2022 02:12 AM UTC

Usage of Watermark

Watermarks is used to protect our documents. For instance, tell the readers who is the owner of the file, company name.

(You can tell me other methods not only the methods of ComPDFKit)

1. The ways to add text watermarks.

2. Image watermarks

 

Thanks!

References
  1. https://www.compdf.com/
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 25 August 2022 02:48 AM UTC
  2. Elevate Discussion
  3. # 1

Hi Youna;

   I've been doing this for decades with PB. In this case, the DataWindow is your friend. The two key features of the DWO for accomplishing watermarks are: A) Transparency and B) Layers (aka Bands).

   The first step is to place the text, image, etc controls (even another DWO) into to primary DWO's "background" layer that creates the actual watermark effect. Make sure that these controls are set to a very light grey.

  Next, add your regular controls to the "Band" layer but set their transparency to 50% so that the "background" layered objects (watermark) shows through.

  The alternate approach is to place your data in the Band layer using 0% transparency (normal default). Then add the watermark objects into the "Foreground" layer but make them 50% plus transparent so that the data seems to bleed through. This will also create the watermark illusion.

  Note that the 1st approach is also excellent for pre-printed business forms where the scanned form sits into the background layer with the data placed over the appropriate sections in the band layer over the form in the background layer.

 Hope that makes sense. Now if the DWO displays the data + watermark properly, the resulting SaveAs(PDF!) will render an exact watermarked PDF file.

Hope that makes sense. 

Tip: Use the "Escapement" property to rotate the watermark text. For example the word "confidential" displayed diagonally in the DWO & thus in the resulting PDF.

Regards ... Chris 

 

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 25 August 2022 04:24 AM UTC
  2. Elevate Discussion
  3. # 2

Chris' suggestions are excellent and I encourage you to investigate and experiment. Using the Background and Foreground layers is not something that every PB developer is familiar with.

Tip: When working with a DWObject assigned to either the background or foreground layers, pretend the normal bands (header, detail, footer, etc.) are not there. Even though the bands are visible and you can continue to interact with them and with objects assigned to the Band layer, the background and foreground layers are each like a sheet of transparency film that covers the entire Painter. With a little experimentation, you'll quickly see what I mean.

If I may also provide some additional information about Escapement:

This property is found at the bottom of the "Font" tab in the Properties pane of the DW Painter (See PB Help topic "Font.Escapement property" for more information). You have to set its value using the Expression dialog window, but the expression can be simply an integer value. Escapement is expressed in tenths of a degree (450 = 45 degrees). Positive rotation is counter-clockwise. Normally, the rotation is applied to the baseline of the text, but this depends on the text alignment setting (refer to Help).

Please note that escapement is only applied/seen in the DW Painter in the preview pane (and of course, at runtime)... in other words, the text DWObject(s) that have escapement will appear in the Painter as normal, with no escapement. This is the way it works. I believe this is why you are required to define escapement as an expression.

Good luck!

Comment
  1. Chris Pollach @Appeon
  2. Monday, 26 September 2022 18:08 PM UTC
Hi John et Al;

FYI... I just added two new watermark examples in my STD Framework's App Demo using the layered approach. You can check this feature out in latest version of the Demo App for PB2022. You can download it from here ..

https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry/Beta/PB2022

Regards ... Chris
  1. Helpful 1
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Thursday, 25 August 2022 07:53 AM UTC
  2. Elevate Discussion
  3. # 3

Also kindly watch this page 

https://docs.appeon.com/pb/whats_new/New_PDFBuilder_objects.html

Where Appeon is enhancing PDF features... may be watermark could be added in next releases...

 

Comment
There are no comments made yet.
Bernhard Giesriegl Accepted Answer Pending Moderation
  1. Monday, 26 September 2022 06:49 AM UTC
  2. Elevate Discussion
  3. # 4

How would I use a watermark from a TX Text Control document? Currently I need a pdf-printer to underlay a background...

Comment
  1. Sally Li @Appeon
  2. Monday, 21 November 2022 05:45 AM UTC
The PDFBuilder in PB 2022 R2 will allow you to add watermarks to the PDF that are generated in the TX Text Control as well. Join us at the Elevate 2022 Keynote, you will be able to see the live demo of this feature.



Regards,

Sally Li
  1. Helpful 2
  1. Bernhard Giesriegl
  2. Monday, 21 November 2022 09:34 AM UTC
thanks, Im looking forward!
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.