Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ Maven_Ant_Builder.launch
/openhtmltopdf-core/nbproject/
/.vscode/
/.metadata/
openhtmltopdf-examples/.factorypath
2 changes: 1 addition & 1 deletion openhtmltopdf-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.0.11-SNAPSHOT</version>
<version>1.0.11.20240615</version>
</parent>

<artifactId>openhtmltopdf-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,9 @@ protected int getCSSWidth(CssContext c) {
RectPropertySet padding = getPadding(c);
result -= (int)padding.left() + (int)padding.right();
}

RectPropertySet margin = getMargin(c);
result -= (int)margin.left() + (int)margin.right();

return result >= 0 ? result : -1;
}
Expand Down
2 changes: 1 addition & 1 deletion openhtmltopdf-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.openhtmltopdf</groupId>
<artifactId>openhtmltopdf-parent</artifactId>
<version>1.0.11-SNAPSHOT</version>
<version>1.0.11.20240615</version>
</parent>

<artifactId>openhtmltopdf-examples</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
input { color: orange; font-family: monospace; }
textarea { color: red; font-family: monospace; }
button { color: blue; font-family: monospace; border-radius: 8px; background-color: yellow; }
input[name="signature"] { color: green; }
</style>
</head>
<body>
Expand All @@ -20,6 +21,7 @@
<input type="submit" value="GO!"/>
<button type="submit">SUBMIT</button>
<input type="password" name="notvery" value="secret"/>
<input type="text" name="signature" class="signature"/>

<div>
<input type="checkbox" name="checker1" value="1" checked="" style="-fs-checkbox-style: check;" />
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<html>
<head>
<style>
@page {
size: 200px 100px;
margin: 5px;
}
body {
margin: 0;
}
input {
width: 12em;
height: 50px;
}
</style>
</head>
<body>
<form>
<div>Text</div>
<input type="text" name="text-input" value="Hello World!" style="border: 1px solid red;" />
<div>Text</div>
<input type="text" name="text-input2" value="Hello Second World!" style="border: 1px solid green;" />
</form>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<html>
<head>
<style>
@page {
size: 500px 250px;
margin:0;padding:20px;
}
body {margin:0;padding:0;font-size:10px; font-famliy: TestFont, serif, sans-serif; }
div {border: 0px}
input[name="signature"] {
height: 80px;
width: 150px;
border: 0;
background-color: lightgrey;
}
input[name="another-signature"] {
width: 400px;
height: 2.5em;
border: 0;
border-bottom: 1px solid black;
}
</style>
</head>

<body>
<div>
<form>
<div>
Required signature please:
<input type="text" name="signature1" required="required" class="signature"/>
</div>
<div>

<input type="text" name="another-signature" title="Alternate Field Name" alt="Partial Nameeee" class="signature"/>
<div>Another one</div>
</div>

</form>
</div>
</body>
</html>
Loading