Announcement

Collapse
No announcement yet.

Dompdf : Watermark

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

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

    Click image for larger version

Name:	image.png
Views:	153
Size:	32.2 KB
ID:	105711

    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...
X