I was able to find an answer. Here it is in case anyone needs it:
define the margins using @page
like:
@page *{
margin-top: 2.54cm;
margin-bottom: 2.54cm;
margin-left: 3.175cm;
margin-right: 3.175cm;
}
</style>';
Reference: http://www.mpdf1.com/forum/discussion/80