example02.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. $content = 'A Test overflow<br>A Test overflow<br>A Test overflow<br>
  3. <img src="./res/logo.gif" alt="logo" style="width: XXXmm"><br>
  4. B Test overflow<br>B Test overflow<br>B Test overflow<br>
  5. <img src="./res/logo.gif" alt="logo" style="width: XXXmm"><br>
  6. C Test overflow<br>C Test overflow<br>C Test overflow<br>';
  7. ?>
  8. <style type="text/css">
  9. <!--
  10. div.zone
  11. {
  12. border: solid 2mm #66AACC;
  13. border-radius: 3mm;
  14. padding: 1mm;
  15. background-color: #FFEEEE;
  16. color: #440000;
  17. }
  18. div.zone_over
  19. {
  20. width: 30mm;
  21. height: 35mm;
  22. overflow: hidden;
  23. }
  24. -->
  25. </style>
  26. <page style="font-size: 10pt">
  27. <span style="font-size: 16pt ; font-weight: bold">Démonstration des images</span><br>
  28. <br>
  29. <b>Dans un tableau :</b><br>
  30. <table style="width: 50%;border: solid 3px #5544DD" align="center">
  31. <tr>
  32. <td style="width: 30%; text-align: left; ">Text à gauche<br>avec retour à<br>la ligne</td>
  33. <td style="width: 40%; text-align: center;"><img src="./res/logo.gif" alt="" ><br><i>légende</i></td>
  34. <td style="width: 30%; text-align: right; ">Texte à droite</td>
  35. </tr>
  36. </table>
  37. <br>
  38. Texte <span style="text-decoration: underline">souligné</span>,
  39. texte <span style="text-decoration: overline">surligné</span>,
  40. texte <span style="text-decoration: line-through">barré</span>,
  41. texte <span style="text-decoration: underline overline line-through">avec les trois</span>.<br>
  42. <br>
  43. <b>Dans un texte :</b><br>
  44. texte à la suite d'une image, <img src="./res/logo.gif" alt="" style="height: 10mm">
  45. texte à la suite d'une image, répétitif car besoin d'un retour à la ligne
  46. texte à la suite d'une image, répétitif car besoin d'un retour à la ligne
  47. texte à la suite d'une image, répétitif car besoin d'un retour à la ligne
  48. texte à la suite d'une image, répétitif car besoin d'un retour à la ligne<br>
  49. <br>
  50. <br>
  51. Test différentes tailles texte
  52. <span style="font-size: 18pt;">Test Size</span>
  53. <span style="font-size: 16pt;">Test Size</span>
  54. <span style="font-size: 14pt;">Test Size</span>
  55. <span style="font-size: 12pt;">Test Size</span>
  56. Test différentes tailles texte, répétitif car besoin d'un retour à la ligne
  57. Test différentes tailles texte, répétitif car besoin d'un retour à la ligne
  58. Test différentes tailles texte, répétitif car besoin d'un retour à la ligne
  59. Test différentes tailles texte, répétitif car besoin d'un retour à la ligne
  60. <br>
  61. <br>
  62. <b>Exemple de couleur : </b><br>
  63. <span style="color: RGB(255, 0, 0)">Texte de couleur</span><br>
  64. <span style="color: RGB(0, 1.0, 0)">Texte de couleur</span><br>
  65. <span style="color: RGB(0, 0, 100%)">Texte de couleur</span><br>
  66. <span style="color: CMYK(255, 0, 0, 0)">Texte de couleur</span><br>
  67. <span style="color: CMYK(0, 1.0, 0, 0)">Texte de couleur</span><br>
  68. <span style="color: CMYK(0, 0, 100%, 0)">Texte de couleur</span><br>
  69. <span style="color: CMYK(0, 0, 0, 255)">Texte de couleur</span><br>
  70. <br>
  71. <table>
  72. <tr style="vertical-align: top">
  73. <td>
  74. <u>Exemple 0 :</u><br><br>
  75. <div class="zone" ><?php echo str_replace('XXX', '40', $content); ?></div>
  76. sans overflow
  77. </td>
  78. <td>
  79. <u>Exemple 1 :</u><br><br>
  80. <div class="zone zone_over" style="text-align: left; vertical-align: top; "><?php echo str_replace('XXX', '40', $content); ?></div>
  81. hidden left top
  82. </td>
  83. <td>
  84. <u>Exemple 2 :</u><br><br>
  85. <div class="zone zone_over" style="text-align: center; vertical-align: middle;"><?php echo str_replace('XXX', '40', $content); ?></div>
  86. hidden center middle
  87. </td>
  88. <td>
  89. <u>Exemple 3 :</u><br><br>
  90. <div class="zone zone_over" style="text-align: right; vertical-align: bottom;"><?php echo str_replace('XXX', '40', $content); ?></div>
  91. hidden right bottom
  92. </td>
  93. </tr>
  94. <tr style="vertical-align: top">
  95. <td>
  96. <u>Exemple 0 :</u><br><br>
  97. <div class="zone" ><?php echo str_replace('XXX', '20', $content); ?></div>
  98. sans overflow
  99. </td>
  100. <td>
  101. <u>Exemple 1 :</u><br><br>
  102. <div class="zone zone_over" style="text-align: left; vertical-align: top; "><?php echo str_replace('XXX', '20', $content); ?></div>
  103. hidden left top
  104. </td>
  105. <td>
  106. <u>Exemple 2 :</u><br><br>
  107. <div class="zone zone_over" style="text-align: center; vertical-align: middle;"><?php echo str_replace('XXX', '20', $content); ?></div>
  108. hidden center middle
  109. </td>
  110. <td>
  111. <u>Exemple 3 :</u><br><br>
  112. <div class="zone zone_over" style="text-align: right; vertical-align: bottom;"><?php echo str_replace('XXX', '20', $content); ?></div>
  113. hidden right bottom
  114. </td>
  115. </tr>
  116. </table>
  117. </page>