Blame view

export/PHPRtfLite-1.3.1/docs/html/_sources/page-layouts.txt 1.77 KB
f90e19c3   Andrea Petta   plugin update
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
  Page settings
  ****************
  
  Page layout
  ===========
  
  Page orientation
  ----------------
  
  You can use between ``landscape`` and ``portrait`` (default) page orientation.
  
  .. code-block:: php
      
      <?php
      // rtf document instance
      $rtf = new PHPRtfLite();
      // landscape page orientation
      $rtf->setLandscape();
  
      
  Page margins
  ------------
  
  You can set margins for the document and for sections, too. Section margins will overwrite document margins.
  
  .. code-block:: php
      
      <?php
      $rtf = new PHPRtfLite();
      // margin left: 1cm
      $rtf->setMarginLeft(1);
      // margin right: 2cm
      $rtf->setMarginRight(2);
      // margin top: 3cm
      $rtf->setMarginTop(3);
      // margin bottom: 4cm
      $rtf->setMarginBottom(4);
      
  
  The code example below does the same in a shorter way.
      
  .. code-block:: php
  
      <?php
      $rtf = new PHPRtfLite();
      // margins: left 1cm, top 3cm, right 2cm, bottom 4cm
      $rtf->setMargins(1, 3, 2, 4);
  
      
  You can define that odd and even pages uses mirrored margins.
  
  .. code-block:: php
  
      <?php
      $rtf = new PHPRtfLite();
      // margin left: 2cm
      $rtf->setMarginLeft(2);
      // margin right: 1cm
      $rtf->setMarginRight(1);
      // odd pages: left 2cm, right 1 cm
      // even pages: left 1cm, right 2 cm
      $rtf->setMirrorMarings();
      
      
  Page width / page height
  ------------------------
  
  .. code-block:: php
  
      <?php
      $rtf = new PHPRtfLite();
      $rtf->setPageWidth(14);  // in cm
      $rtf->setPageHeight(25); // in cm
  
  
  Character set (text input)
  ==========================
  
  .. code-block:: php
  
      <?php
      $rtf = new PHPRtfLite();
      $rtf->setCharset('Latin1');  // use Latin1 instead of UTF-8
      
      
  Hyphenation
  =====================
  
  .. code-block:: php
  
      <?php
      $rtf = new PHPRtfLite();
      $rtf->setHyphenation();