|
@@ -101,8 +101,11 @@ public enum PageSizeEnum {
|
|
|
* @return
|
|
|
*/
|
|
|
public static PageSizeEnum convertToEnum(float width, float height) {
|
|
|
- float deviation = SystemConstant.PAPER_DEVIATION;
|
|
|
for (PageSizeEnum e : PageSizeEnum.values()) {
|
|
|
+ float deviation = SystemConstant.PAPER_DEVIATION;
|
|
|
+ if (PageSizeEnum.A3.equals(e)){
|
|
|
+ deviation = 2 * SystemConstant.PAPER_DEVIATION;
|
|
|
+ }
|
|
|
float standardWidth = e.getWidth();
|
|
|
float standardHeight = e.getHeight();
|
|
|
if (standardWidth - deviation <= width && width <= standardWidth + deviation && standardHeight - deviation <= height && height <= standardHeight + deviation){
|