I use Laravel 5.3
I use :
"barryvdh/laravel-debugbar": "^2.3",
"barryvdh/laravel-dompdf": "^0.7.0",
"dompdf/dompdf": "0.7.x#dev",
I get from here : https://github.com/barryvdh/laravel-dompdf
In config\dompdf.php, I set :
"DOMPDF_ENABLE_CSS_FLOAT" => true,
In my html pdf, I try :
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Test</title>
<style type="text/css">
body {
font-family: "Arial", Helvetica, sans-serif !important;
font-size: 9px;
margin-bottom: 100px;
}
.container {
background:#fff;
overflow:auto;
}
.left {float:left;}
.right {float:right;}
</style>
</head>
<body>
<div class="container">
<div class="left">Float left</div>
<div class="right">Float right</div>
</div>
</body>
</html>
The float not working
How can I solve it?
Update :
The result of pdf is like this :
Use
display: inline-block;
instead of float.
I use the older version of dompdf in my project. I enable DOMPDF_ENABLE_CSS_FLOAT true in dompdf_config.custom.inc file. But the float result is overlapping and distorted.
The inline-block is the new and better way than using float left every time. Visit the following w3school link to more info. CSS Layout - inline-block
You should use the following.
.container{
...
display : block;
}
Related
I am still kind of new to HTML and CSS, so I wanted to ask if this is a good way to make my footer always stick to the bottom without overlapping with anything. I also included some PHP to make my work easier and just require the header and footer on each webpage.
Here is what I have:
index.php
<!DOCTYPE html>
<html>
<head>
<title>Начало - Гравиране Провадия</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<?php
require_once 'requires/header.html';
?>
SAMPLE CONTENT, blah blah.
<?php
require_once 'requires/footer.html';
?>
</body>
</html>
footer.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
html {
height: 100%;
}
body {
min-height: 100%;
display: flex;
flex-direction: column;
}
footer {
background: #A6FF46;
font-family: 'Roboto';
text-align: center;
padding: 0.5rem;
margin-top: auto;
}
</style>
</head>
<body>
<footer>
Copyright © 2022, Gravirane Provadia. All rights reserved.
</footer>
</body>
</html>
Did you try position: fixed;? That creates it so that the element will always 'stick' to the position you set it to using left: position;,bottom: position;,etc.
I'm using PHP mpdf library for PDF export. But the HTML code alignment and position of all content changes when i export HTML to PDF.
Please explain how can I export the full HTML page as it is to the PDF page.
<?php $html='<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style type="text/css">
body, html { height: 100%; margin: 0px; width: 100% !important;}
</style>
</head>
<body>
<center>
<div class="container" style="position: relative; width: 80%; left: 20%; display: block; text-align: center;">
<div style="position: absolute; left: 40%; width: 60%; text-align: center;">
<img src="p1/logo.png">
<h1 style="text-align: center;">TALENTX™</h1>
<h1>Profile</h1>
<h1>Aljoharah AlBabtain</h1>
<p>RESULTS REFERENCE REPORT JUNE 2020</p>
</div>
</div>
</center>
</body>
</html>';
require_once APPPATH . 'libraries/mpdf/autoload.php';
$mpdf = new \mPDF('utf-16','A4','');
$html = $this->load->view('reps/p1',null,true);
$mpdf->WriteHTML($html);
$mpdf->Output("files/test.pdf",'F');
The best way for aligning the HTML content in PDF export or for printout is the <table> approach. Put all your content in the table columns.
I use this approach and all my problem fixed.
I have a problem converting an HTML file to pdf, when trying to add a footer, the size rendered as PDF is not the one specified in the css.
The size of the footer must be exactly 155mm, but if I tell wkhtml2pdf to have a bottom border of 155mm, the footer starts almost at half of the page.
I have tried with a simpler html page of 50mm with 5 stripes of 10mm each, and with the switch -B 50mm I have a margin below the actual footer of 50mm
The command that I am running is: wkhtmltopdf.exe -B 150mm -L 0 -R 0 -T 0 --footer-html footer.html page.html page.pdf
To have the footer placed correctly, I have to use -B 119mm
Can someone help me or point me to the right direction ? I read many posts about that but could not solve my problem, it seems that windows installation act differently from Linux one, but I will only install it on windows host, so no problem about a windows-only solution
page.html
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Header</title>
<link rel="stylesheet" href="css/normalize.css?v=1.0">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
coucou
</body>
</html>
footer.html
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Footer</title>
<link rel="stylesheet" href="css/normalize.css?v=1.0" media="all">
<link rel="stylesheet" href="css/footer.css?v=1.0" media="all">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div id="bvr">
<div class="bvr-cut">
<div class="payment-recipient">
blahblah
</div>
<div class="payment-account">01-88205-8</div>
<div class="payment-amount">
<span class="val">3</span>
<span class="val">2 5</span>
</div>
<div class="payment-sender">
blahblah
</div>
</div>
<div class="bvr-cut">
<div class="payment-recipient">
blahblah
</div>
<div class="payment-account">01-88205-8</div>
<div class="payment-amount">
<span class="val">3</span>
<span class="val">2 5</span>
</div>
<div class="payment-sender">
blahblah
</div>
</div>
<div class="bvr-code">
<div class="col c12">
blahblah
</div>
</div>
</div>
</body>
</html>
footer.css
#charset "UTF-8";
#bvr {
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
background: #FC0;
font-family: "Helvetica-Neue", Helvetica, sans-serif;
height:155mm;
page-break-after: auto;
display: block;
clear: both;
border: 1px solid #000;
}
.bvr-cut {
float:left;
width: 230px;
background: #ccc;
}
.payment-recipient {
height: 72px;
position: relative;
background: #0cf;
}
.payment-account {
text-align: right;
font-weight: 600;
padding-right: 4.5em;
margin-bottom: .6em;
background: #12F;
}
.payment-amount {
background: #FCC;
text-align: right;
margin-bottom: .8em;
}
.payment-amount > span.val {
border: 1px solid #000;
padding-right: 2em;
}
.payment-sender {
position: relative;
background: #f0c;
}
.bvr-ref {
display: block;
background: #FF0;
}
.bvr-code {
background: #c0f;
}
After searching, I found out that the problem didn't come from wkhtmltopdf but to a processed size issue in windows systems.
If I run that code on unix based systems everything works great, but on windows it doesn't. In fact, font size (and any other size: height, width, etc.) in windows must be scaled with a 1.33 ratio in order to render exactly the same as it does in unix.
I couldn't find a link in english, but here a little explaination which worked great for me (search "1.33") in the webpage.
Basically, I created two classes in my css:
html: { font-size: 93.1%; }
body: { height: 88mm; }
/*–––––––––––––––––––––––– system hacks –––––––––––––––––––––––– */
/**
* Unix* system based servers render font much
* bigger than windows based server.
* Force windows font to 100% and rescale the
* linux rendering by the magic factor (1.33)
*/
.linux {
font-size: 70%;
}
/**
* base size: 88mm
*
* for wkhtmltopdf generation,
* body size must be multiplied by 1.33 factor on windows systems
*/
.win body {
height: 117.04mm;
}
And with a bit of php, I've added dynamically the class to the <html> tag based on server system.
I'm trying create a template for my control panel
I want make a "Back" button in the template, where I can set your href is set for extended page
So I tried use #yield for set, but not have success
Fallowing my code
// in my template -> layouts.master.blade.php
Back
//my extended page -> user.edit.blade.php
#extends('../layouts.master')
#section('back')
dashboard
#stop
I'm not sure why it's not working for you, but it should. Here's a test I just did on my end. I got a clean Laravel app, renamed home.php to
layout.blade.php
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Laravel PHP Framework</title>
<style>
#import url(//fonts.googleapis.com/css?family=Lato:700);
body {
margin:0;
font-family:'Lato', sans-serif;
text-align:center;
color: #999;
}
.welcome {
width: 300px;
height: 200px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -150px;
margin-top: -100px;
}
a, a:visited {
text-decoration:none;
}
h1 {
font-size: 32px;
margin: 16px 0 0 0;
}
</style>
</head>
<body>
<div class="welcome">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIcAAACHCAYAAAA850oKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMj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I/56rgCPRp/MKHZTTvNFGAcZobw8iDRGUqeiI6oSQAhWXj5GCMFk56jzWRnLYarkreiPT4NuzpXwgvvKix0M+ZHylsyTng/CoFUvnlsWAyEaSH+dIsRoHNFXfyGO5qsyweC59UtNHvB/AQYAJxSvvrFB3mUAAAAASUVORK5CYII=" alt="Laravel PHP Framework">
<h1>#yield('youhave')</h1>
</div>
</body>
</html>
As you can see I'm using two different yields, wich you'll see in the new
home.blade.php
#extends('layout')
#section('youhave')
You have arrived.
#stop
#section('laraveldotcom')
http://laravel.com
#stop
And it worked fine for me, I could even click the Laravel logo to be redirected to the Laravel site. So you might have a problem somewhere else.
I am create pdf file using dompdf but float property not working. I changed DOMPDF_ENABLE_CSS_FLOAT to true. It works fine in normal php but its not working in laravel 4.
Here is my code.
<!doctype html>
<html lang="en">
<head>
<style type="text/css">
.left {
float: left;
outline: 1px solid green;
width: 6cm;
}
.right {
float: left;
outline: 1px solid blue;
width: 6cm;
}
</style>
</head>
<body>
<div class="left" style="float:left;">left boxes here</div>
<div class="right" style="float:right;">right boxes here</div>
</body>
</html>
Thank you.
use def("DOMPDF_ENABLE_CSS_FLOAT", true); into the dompdf_config.inc.php file
and use the css float into your pdf design, it works