# Ability to layer watermark behind line items?

**URL:** <https://www.dolibarr.org/forum/t/ability-to-layer-watermark-behind-line-items/25332>\
**Category:** CRM/SRM Modules\
**Tags:** Proposals\
**Created:** [May 15, 2024, 6:02am UTC](https://www.dolibarr.org/forum/t/ability-to-layer-watermark-behind-line-items/25332 "2024-05-15T06:02:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![justauser](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/aca169/32.png) [@justauser](https://www.dolibarr.org/forum/u/justauser)\
**Post date:** [May 15, 2024, 6:02am UTC](https://www.dolibarr.org/forum/t/ability-to-layer-watermark-behind-line-items/25332/1 "2024-05-15T06:02:42Z")

</div>

Howdy folks. Still getting the hang of the software. I have a feeling it’s overkill for a two person shop and only one person is using it, but there you go, lol.

I’m fooling around with the Proposals part of the CRM, and the watermark is a nice touch. I have it saying “QUOTE ONLY” in nice big red letters. However, it puts it over the line items, so it blocks out some of the text on the items. Is there a way to move the watermark “behind” the regular text?

Thanks!

---

<div class="post-metadata">

**Author:** ![DG-Rilling](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/d/e495f1/32.png) [@DG-Rilling](https://www.dolibarr.org/forum/u/DG-Rilling)\
**Post date:** [May 15, 2024, 10:37am UTC](https://www.dolibarr.org/forum/t/ability-to-layer-watermark-behind-line-items/25332/2 "2024-05-15T10:37:12Z")

</div>

I think the problem is that the watermark is written at the very end of the PDF creation in the function “pdf\_pagefoot” with the call of the function “\_pagefoot(…)”.

Calling the function "pdf\_watermark(…) after PDF creation with “$pdf-\>AddPage()” would help in my opinion.

---

<div class="post-metadata">

**Author:** ![sonikf](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@sonikf](https://www.dolibarr.org/forum/u/sonikf)\
**Post date:** [May 15, 2024, 12:59pm UTC](https://www.dolibarr.org/forum/t/ability-to-layer-watermark-behind-line-items/25332/3 "2024-05-15T12:59:01Z")

</div>

Hi @justauser  
Assuming you use the default cyan template, you will have to modify \_pagefoot function from

```auto
	protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
	{
		$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
		return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur=0, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
	}

```

```auto
to
	protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
	{
		$showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0);
		$pdf->SetAlpha(0.5);
		return pdf_pagefoot($pdf, $outputlangs, 'PROPOSAL_FREE_TEXT', $this->emetteur=0, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext, $this->page_largeur, $this->watermark);
		$pdf->SetAlpha(1);
	}

```

---

<div class="post-metadata">

**Author:** ![justauser](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/j/aca169/32.png) [@justauser](https://www.dolibarr.org/forum/u/justauser)\
**Post date:** [May 15, 2024, 3:30pm UTC](https://www.dolibarr.org/forum/t/ability-to-layer-watermark-behind-line-items/25332/4 "2024-05-15T15:30:19Z")

</div>

That did it! Thanks very much @DG-Rilling and @sonikf!
