Lesson: lesson-page-areas

This example renders the page regions as defined in the CSS Paged Media specs.

PDF files

Converter PDF Preview
PDFreactor
OK
Download
PrinceXML
OK
Download
Antennahouse
OK
Download
Vivliostyle
OK
Download

Stylesheet

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@import url("../styles/a4.css");

@page {
    border: 1px solid blue;
    font-size: 8pt;

    @top-left-corner {
        content: "@top-left-corner";
        border: 1px solid red;
    }
    @top-left {
        content: "@top-left";
        border: 1px solid red;
    }
    @top-center {
        content: "@top-center";
        border: 1px solid red;
    }
    @top-right {
        content: "@top-right";
        border: 1px solid red;
    }
    @top-right-corner {
        content: "@top-rightcorner";
        border: 1px solid red;
    }

    @bottom-left-corner {
        content: "@bottom-left-corner";
        border: 1px solid red;
    }
    @bottom-left {
        content: "@bottom-left";
        border: 1px solid red;
    }
    @bottom-center {
        content: "@bottom-center";
        border: 1px solid red;
    }
    @bottom-right {
        content: "@bottom-right";
        border: 1px solid red;
    }
    @bottom-right-corner {
        content: "@bottom-rightcorner";
        border: 1px solid red;
    }

    @left-top {
        content: "@left-top";
        border: 1px solid red;
    }
    @left-middle {
        content: "@left-middle";
        border: 1px solid red;
    }
    @left-bottom {
        content: "@left-bottom";
        border: 1px solid red;
    }

    @right-top {
        content: "@right-top";
        border: 1px solid red;
    }
    @right-middle {
        content: "@right-middle";
        border: 1px solid red;
    }
    @right-bottom {
        content: "@right-bottom";
        border: 1px solid red;
    }


    /* PDFreactor (from brochure/styles.css) */
    -ro-media-size: A4;
    -ro-bleed-width: 3mm;
    -ro-crop-size: trim;
    
    /* Printer Marks */
    -ro-marks: bleed trim registration;
    
    -ro-colorbar-left-top: gradient-tint;
    -ro-colorbar-right-top: progressive-color;
    
    -ro-colorbar-left-bottom: cmyk(100%, 0%, 0%, 0%) cmyk(75%, 0%, 0%, 0%) cmyk(50%, 0%, 0%, 0%) cmyk(25%, 0%, 0%, 0%)
                              cmyk(0%, 100%, 0%, 0%) cmyk(0%, 75%, 0%, 0%) cmyk(0%, 50%, 0%, 0%) cmyk(0%, 25%, 0%, 0%);
                              
    -ro-colorbar-right-bottom: cmyk(0%, 0%, 25%, 0%) cmyk(0%, 0%, 50%, 0%) cmyk(0%, 0%, 75%, 0%) cmyk(0%, 0%, 100%, 0%)
                               cmyk(0%, 0%, 0%, 25%) cmyk(0%, 0%, 0%, 50%) cmyk(0%, 0%, 0%, 75%) cmyk(0%, 0%, 0%, 100%);


    /* PrinceXML */
    prince-bleed: 10mm;
    marks: crop cross;

}

HTML input

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="styles.css" />
    </head>
    <body>

        <p id="c-1">
        Pulvinar non pellentesque pellentesque nisi nascetur elementum platea
turpis, eu, pulvinar et, a mauris, etiam vel, facilisis mus, egestas in dapibus
sagittis ac mattis. Phasellus massa cum, habitasse augue sagittis, turpis
penatibus auctor sagittis aenean in! Aenean porta tincidunt ultricies est
lorem, facilisis dignissim tempor auctor ut sociis pulvinar eros egestas eros
placerat habitasse, mid sed mattis velit platea aliquam, purus lorem, lacus et
integer, natoque augue a, facilisis augue, mattis cras! A pid mattis lorem urna
rhoncus. Elementum tincidunt, mus elementum turpis quis ridiculus eu odio
egestas, elit auctor turpis mus platea sed, rhoncus tempor, augue dictumst
phasellus tortor, ac. Massa sagittis sociis integer mid magna a turpis
pellentesque, placerat lundium! Lacus, enim mus odio placerat? Nec cursus
augue.
        </p>

    </body>
</html>