Skip to content
Advertisement

Add image in cell before text with JsPDF AutoTable

I want to put image before text in the same cell of this cell. But I don’t know how to do. The images I try to put are never the same size. For the moment, I tried with a random image, but I don’t know how to shift the text after the image. I’m not even sure that is possible. Here is a part of my code :

JavaScript

In this case, I add this image in each row of the tab.

Hope you will be able to help me, thank you.

Advertisement

Answer

I resolved my problem by myself.

  1. What I needed to do is to add the image at the position of left border of the cell I wanted to put the image in.

  2. Then I set the minheight of the cell to the heigth of the pic.

  3. Finally, I set the left padding to size of picture.

  4. Now, I am able to have an image before the text.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement