Overflow hidden not respected wkhtmltopdf (codeigniter)

654 views
Skip to first unread message

lvas...@grupodit.com

unread,
Aug 27, 2018, 10:44:47 AM8/27/18
to wkhtmltopdf General
I'm trying to make a div with overflow hidden and rounded corners, this is my only option because i'm using wkhtmltopdf for rendering resume's people, so when they put their image or profile picture, the container makes bigger or doesn't work because pictures are not with the same sizes, so i'm put the <img> tag into a div for make this one for only one size and if the picture is bigger, this one going behind the rounded div.

Could anybody bring me some idea how can i make it?

This is the structure:


HTML
<div class="main">
   <div class="middle">
       <img src="#">
   </div>
</div> 

CSS

.main {
      width: 125px;
      height: 125px;
      position: relative;
}
.middle {
    width: 100%;
    height: 100%;
    position: absolute;
    overflow: hidden;
    border-radius: 50%;
}
.middle img{
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
}

Waqas Raza

unread,
Feb 24, 2021, 10:57:11 AM2/24/21
to wkhtmltopdf General

Hi lvas, 
Please  tell me the steps to call the snappy in my controller function. 
I've got
Failed to load PDF document
 because of maybe some header issue i think 
i use this code inside a controller function 
header('Content-Type: application/pdf');
echo $snappy->getOutput('http://www.google.com');

This site can’t be reached. 
error come. 
please respond to this Error,
I'm using the Snappy package. 
Regards.


Reply all
Reply to author
Forward
0 new messages