-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#180 - Implemented -fs-if-cut-off function and test with overflow page.
Also cleaned up ContentFunctionFactory class.
- Loading branch information
Showing
4 changed files
with
131 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+9.19 KB
openhtmltopdf-examples/src/main/resources/visualtest/expected/text/content-page-numbers.pdf
Binary file not shown.
49 changes: 49 additions & 0 deletions
49
openhtmltopdf-examples/src/main/resources/visualtest/html/text/content-page-numbers.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<html> | ||
<head> | ||
<style> | ||
@page { | ||
size: 180px 100px; | ||
margin: 18px; | ||
-fs-max-overflow-pages: 10; | ||
-fs-overflow-pages-direction: ltr; | ||
|
||
@top-left { | ||
content: "Page " counter(page) -fs-if-cut-off(" (continued)") " of " counter(pages); | ||
font-family: 'TestFont'; | ||
font-size: 12px; | ||
} | ||
} | ||
body { | ||
margin: 0; | ||
} | ||
div { | ||
box-sizing: border-box; | ||
margin: 0; | ||
} | ||
.outer { | ||
border: 1px solid black; | ||
background-color: red; | ||
min-height: 20px; | ||
} | ||
.inner { | ||
border: 1px solid blue; | ||
background-color: orange; | ||
min-height: 15px; | ||
} | ||
</style> | ||
</head> | ||
<body style="font-family: 'TestFont'; color: black; font-size: 12px;"> | ||
PAGE 1. | ||
|
||
<div style="page-break-before: always;"></div> | ||
|
||
PAGE 2 (with overflow). | ||
<div class="outer" style="width: 150%;"> | ||
<div class="inner" style="width: 100%;">ABCDEFGHIJKLMNOPQRSTUVWXYZ</div> | ||
</div> | ||
|
||
<div style="page-break-before: always;"></div> | ||
|
||
PAGE 3. | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters