Location: PHPKode > projects > Lithron > lithron-1.0.2/examples/005-padding_and_margin.xml.php
<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<lithron>
    <style>
        page.A4 {
            height: 297mm;
            width: 210mm
        }
        .test1
        {
            margin-top: 1cm;
            margin-right: 2cm;
            margin-bottom: 3cm;
            margin-left: 4cm;

            padding-top: 1cm;
            padding-right: 2cm;
            padding-bottom: 3cm;
            padding-left: 4cm;

            background-color: cmyk(20,0,0,0);
        }
        .test2
        {
            margin-top: 1cm;
            margin-right: 1cm;
            margin-bottom: 1cm;
            margin-left: 1cm;

            padding-top: 5mm;
            padding-right: 5mm;
            padding-bottom: 5mm;
            padding-left: 5mm;

            background-color: cmyk(0,20,0,0);
        }
        .test3a
        {
            margin-top: 1cm;
            margin-right: 1cm;
            margin-bottom: 1cm;
            margin-left: 1cm;

            padding-top: 5mm;
            padding-right: 5mm;
            padding-bottom: 5mm;
            padding-left: 5mm;

            background-color: cmyk(0,0,20,0);
        }
        .test3b
        {
            margin-top: 1cm;
            margin-right: 1cm;
            margin-bottom: 1cm;
            margin-left: 1cm;

            padding-top: 2cm;
            padding-right: 2cm;
            padding-bottom: 2cm;
            padding-left: 2cm;

            background-color: cmyk(0,0,0,20);
        }
    </style>

    <file name="<?php echo "lithron-".basename(__FILE__,"xml.php")."pdf" ?>">
        <page class="A4">
            <div class="test1">A dummy text for rendering tests, do not read, please!
            I mean this serious, really ;)</div>
            <div class="test2">A dummy text for rendering tests, do not read, please!
            I mean this serious, really ;)</div>
            <div class="test3a">
                <div class="test3b">A dummy text for rendering tests, do not read, please!
                I mean this serious, really ;)</div>
            </div>
        </page>
    </file>



</lithron>
Return current item: Lithron