Skip to content

Commit 8b26ace

Browse files
committed
Improve examples
1 parent 0b729fb commit 8b26ace

6 files changed

Lines changed: 71 additions & 76 deletions

File tree

examples/elements.html

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Supported elements</title>
5+
</head>
6+
<body style="font-family: 'Times-Roman';">
7+
tag A: <a href="https://www.google.com">link</a> <br>
8+
tag B: <b>bold</b> <br>
9+
tag Blockquote: <blockquote>block quotation element</blockquote>
10+
tag Br: new line <br>
11+
tag Code: <code>inline code element</code> <br>
12+
tag Del: <del>strike-through</del> <br>
13+
tag Div: <div>block element</div>
14+
tag Em: <em>italic</em> <br>
15+
tag H1: <h1>heading h1</h1>
16+
tag H2: <h2>heading h2</h2>
17+
tag H3: <h3>heading h3</h3>
18+
tag H4: <h4>heading h4</h4>
19+
tag H5: <h5>heading h5</h5>
20+
tag H6: <h6>heading h6</h6>
21+
tag Hr: horizontal line <hr>
22+
tag I: <i>italic</i> <br>
23+
tag Ins: <ins>underline</ins> <br>
24+
tag Img: <img src="./examples/image.jpg" style="width: 100px"> image <br>
25+
tag Mark: <mark>highlight</mark> <br>
26+
tag Ol: <ol>
27+
<li>ordered list</li>
28+
<li>tag Li: list item (ordered)</li>
29+
</ol>
30+
tag P: <p>block element</p>
31+
tag Pre: <pre>preformatted text element</pre>
32+
tag S: <s>strike-through</s> <br>
33+
tag Small: <small>smaller text</small> <br>
34+
tag Span: <span>inline element</span> <br>
35+
tag Strong: <strong>bold</strong> <br>
36+
tag Sub: <sub>subscript element</sub> <br>
37+
tag Sup: <sup>superscript element</sup> <br>
38+
tag U: <u>underline</u> <br>
39+
tag Ul: <ul>
40+
<li>unordered list</li>
41+
<li>tag Li: list item (unordered)</li>
42+
</ul>
43+
</body>
44+
</html>

examples/elements.pdf

36.5 KB
Binary file not shown.

examples/misc_elements.html

Lines changed: 0 additions & 73 deletions
This file was deleted.

examples/misc_elements.pdf

-5.37 KB
Binary file not shown.

examples/random_content.html

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,22 @@
44
<title>Random content</title>
55
</head>
66
<body style="font-family: 'Times-Roman';">
7-
<h1>A test document <small>(with the supported elements)</small></h1>
8-
This is <i style="color: #df2818">italic</i>, <u>underline</u> and <b>bold, <i>bold italic</i></b>
7+
<h1>Random content <small>(with various elements and styles)</small></h1>
8+
9+
Test inline elements:
10+
this is <i style="color: #df2818">italic</i>, <u>underline</u> and <b>bold, <i>bold italic</i></b>
11+
912
<br />
1013
<br />
1114
<br />
1215

16+
<div>div element</div>
17+
<div>div (2) element</div>
18+
<span>span element</span>
19+
<span>span (2) element</span>
20+
21+
<blockquote>The Block Quotation element</blockquote>
22+
1323
<hr style="color: #080" />
1424

1525
<div style="text-align: left">text-align: left</div>
@@ -26,7 +36,7 @@ <h1>A test document <small>(with the supported elements)</small></h1>
2636
<hr/>
2737

2838
Begin of list
29-
<ul style="margin-bottom: 20px">
39+
<ul>
3040
<li>Level 1a</li>
3141
<li>Level 1b
3242
<ul>
@@ -35,10 +45,13 @@ <h1>A test document <small>(with the supported elements)</small></h1>
3545
<ul>
3646
<li>Level 3a</li>
3747
<li>Level 3b</li>
48+
<li>Level 3c</li>
3849
</ul>
3950
</li>
51+
<li>Level 2c</li>
4052
</ul>
4153
</li>
54+
<li>Level 1c</li>
4255
</ul>
4356
End of list
4457

@@ -86,10 +99,21 @@ <h3>More text</h3>
8699
<hr />
87100
<br />
88101

102+
This is an inline <code>code</code> element.
103+
<pre> this is pre element </pre>
104+
last line.
105+
89106
<div style="text-align: center">
90107
An image:<br/>
91108
<img src="./examples/image.jpg" style="width: 50%" />
92109
</div>
110+
<p>Some other paragraph</p>
111+
112+
<div style="color: red; position: absolute; top: 100px; left: 300px">
113+
<em>Position: absolute</em>
114+
</div>
115+
116+
<h2 style="break-before: auto">New page</h2>
93117

94118
<b>End of document</b>
95119
</body>

examples/random_content.pdf

2.38 KB
Binary file not shown.

0 commit comments

Comments
 (0)