J
J
JohnDaniels2016-07-13 14:22:50
Yii
JohnDaniels, 2016-07-13 14:22:50

What is the problem of generating pdf?

Site in yii2, pdf generated with kartik-v/yii2-mpdf .
Problems start when I try to insert an image.
do

<td style="background:  url(<?= Url::to('@front/uploads/stamp.jpg') ?>) no-repeat contain;">
        Место для штампа организации
</td>

and I get such a blue cloud; c76e685e45214dfe9c1f7bcd9babea11.png
if you remove no-repeat , it will be drawn normally, but it will cover the entire cell.
jpg/png tried.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Timofeev, 2016-07-13
@webinar

This is not a widget bug, but a feature of mPDF rendering.
It has its own custom settings for background.
Here is the solution:
stackoverflow.com/questions/20828776/mpdf-full-pag...

A
Andrey, 2016-07-13
@AndreyMyagkov

background: url(<?= Url::to('@front/uploads/stamp.jpg') ?>) 0 0 no-repeat;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question