# How to modify UltimatePDF to force cover image?

**URL:** <https://www.dolibarr.org/forum/t/how-to-modify-ultimatepdf-to-force-cover-image/19901>\
**Category:** DoliStore's external modules\
**Created:** [December 9, 2020, 9:32pm UTC](https://www.dolibarr.org/forum/t/how-to-modify-ultimatepdf-to-force-cover-image/19901 "2020-12-09T21:32:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![futurehousestore](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/f/8e8cbc/32.png) [@futurehousestore](https://www.dolibarr.org/forum/u/futurehousestore)\
**Post date:** [December 9, 2020, 9:32pm UTC](https://www.dolibarr.org/forum/t/how-to-modify-ultimatepdf-to-force-cover-image/19901/1 "2020-12-09T21:32:38Z")

</div>

Hi everyone,  
Does anyone know where and what needs to be changed in the UltimatePDF module to force the cover image?  
My Dolibarr is synchronised with my Presta Shop and I create the products in PrestaShop. Once a product is created in Prestashop it appears in Dolibarr with all the images. The images names look like that XXXX-XXXX.jpeg and all the cover images contain word “cover” coverXXXX-XXXX.jpeg  
At the moment to display the product images in the PDF document I need to change the displayed image eg. to 8888.jpeg so the document displays the cover instead of a random picture. It is very time consuming but not so bad if the product has 2-3 images but if the product has more eg. 10 images it takes ages to work out the names for the images so they are displayed properly.

 ![Capture](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/f/f8c055c6f388476021d8933756b7165c5496627b.png)

 ![2](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/9/9af538b9c250f0332a30c0cc464ec441cdd0e450.png)  
 ![3](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/7/7fd5bad90df8f554d3caf6c27a8902e8fa9dcf7b.png)  
 ![4](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/d/df539ad4550ec5a92159a19a2b1c1d25c7dd0913.png)

---

<div class="post-metadata">

**Author:** ![futurehousestore](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/f/8e8cbc/32.png) [@futurehousestore](https://www.dolibarr.org/forum/u/futurehousestore)\
**Post date:** [December 14, 2020, 7:06pm UTC](https://www.dolibarr.org/forum/t/how-to-modify-ultimatepdf-to-force-cover-image/19901/2 "2020-12-14T19:06:12Z")

</div>

@pscoffoni can you help with it?

---

<div class="post-metadata">

**Author:** ![futurehousestore](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/f/8e8cbc/32.png) [@futurehousestore](https://www.dolibarr.org/forum/u/futurehousestore)\
**Post date:** [May 28, 2021, 9:51am UTC](https://www.dolibarr.org/forum/t/how-to-modify-ultimatepdf-to-force-cover-image/19901/3 "2021-05-28T09:51:58Z")

</div>

Has anyone managed to solve this problem?
