PHP code example of medilies / ctrl-p
1. Go to this page and download the library: Download medilies/ctrl-p library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
medilies / ctrl-p example snippets
// php -S 0.0.0.0:8080 .\this_file.php
// Visit http://127.0.0.1:8080/
use Medilies\CtrlP\CtrlP;
id HTML Page</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
display: flex;
height: 100vh;
}
.sidebar {
background-color: #f2f2f2;
width: 250px;
padding: 20px;
}
.main-content {
flex: 1;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 20px;
padding: 20px;
background-color: #e0e0e0;
}
.box {
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<div class="sidebar">
<h2>Sidebar</h2>
<p>Some sidebar content goes here.</p>
</div>
<div class="main-content">
<div class="box">Box 1</div>
<div class="box">Box 2</div>
<div class="box">Box 3</div>
<div class="box">Box 4</div>
<div class="box">Box 5</div>
<div class="box">Box 6</div>
</div>
</div>
</body>
</html>
')
->margins('1cm')
// ->paperSize('130mm', '130mm')
->format('A4')
->landscape()
->title('Chad PDF')
->urlPath('/drip-url')
->autoPrint()
->printButton()
->backUrl('/some-path')
->get();