Dompdf : Watermark

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • item
    Active Community Member
    • Mar 2017
    • 1512

    Dompdf : Watermark

    I have looked for add watermark.. and find a solution (certainly not best way) but work.
    i have try to make a custom template helper but not luck.

    Add in Pdf Template CSS field :

    PHP Code:
      #watermark {
        
    positionfixed;
        
    top45%;
        
    width100%;
        
    text-aligncenter;
        
    opacity.1;
        
    transformrotate(45deg);
        
    transform-origin4545%;
        
    z-index1;
        
    font-size80;
      }
    ​ 
    Add in any place on Pdf Template content :

    PHP Code:
      <div id="watermark">
        
    CONFIDENTIAL
      
    </div
    if someone can have a more good solution .. hope

    watermark is only printed in first page
    Last edited by item; 05-02-2024, 09:40 PM.
    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​
  • yuri
    Member
    • Mar 2014
    • 8801

    #2
    Will work if you add the div to the header.

    Click image for larger version

Name:	image.png
Views:	195
Size:	32.2 KB
ID:	105711
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment


    • item
      item commented
      Editing a comment
      Yes, find it too
      and i have make a template helper : he add a div with style :

      {{watermark text='confidentielle'}}
Working...