Browse Source

去掉pdf字体旋转校验

caozixuan 2 năm trước cách đây
mục cha
commit
013c44d229

+ 10 - 0
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/PdfUtil.java

@@ -260,4 +260,14 @@ public class PdfUtil {
             }
         }
     }
+
+    public static void main(String[] args) {
+        File file2 = new File("E:\\file\\《航空通信原理B》期末考试 A卷 答题卷.pdf");
+        try {
+            System.out.println(PdfUtil.getPdfFormat(file2));
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+    }
 }

+ 2 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/enums/PageSizeEnum.java

@@ -112,7 +112,8 @@ public enum PageSizeEnum {
                 return e;
             }
             if (standardWidth - deviation <= height && height <= standardWidth + deviation && standardHeight - deviation <= width && width <= standardHeight + deviation){
-                throw ExceptionResultEnum.ERROR.exception("请检查上传的【"+ e.name() + "】纸张字体方向是否反了");
+//                throw ExceptionResultEnum.ERROR.exception("请检查上传的【"+ e.name() + "】纸张字体方向是否反了");
+                return e;
             }
         }
         throw ExceptionResultEnum.ERROR.exception("pdf格式不符合标准规范,请提供标准的pdf(可使用wps、office的word转换)");