Skip to content

Commit

Permalink
Adds a PageSize.fromMillimeters()
Browse files Browse the repository at this point in the history
  • Loading branch information
ediweissmann committed Oct 29, 2024
1 parent 65ded20 commit 9e9a06a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sejda-model/src/main/java/org/sejda/model/PageSize.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ public static PageSize fromInches(float widthInch, float heightInch) {
return new PageSize(widthInch * POINTS_PER_INCH, heightInch * POINTS_PER_INCH);
}

public static PageSize fromMillimeters(float widthInch, float heightInch) {
return new PageSize(widthInch * POINTS_PER_MM, heightInch * POINTS_PER_MM);
}

public String getName() {
return name;
}
Expand Down

0 comments on commit 9e9a06a

Please sign in to comment.