diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/ContractServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/ContractServiceImpl.java index cb9070b..747daa4 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/ContractServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/ContractServiceImpl.java @@ -409,10 +409,11 @@ public class ContractServiceImpl implements ContractService { //获取pdf宽度 float width = document.getPage(pageNo).getMediaBox().getWidth(); - positionX = (float) (width * positionX / 750.0); - positonY = (float) (width * positonY / 750.0); - imageWidth = (float) (width * imageWidth / 750.0); - imageHeight = (float) (width * imageHeight / 750.0); + float height = document.getPage(pageNo).getMediaBox().getHeight(); + positionX = (float) (width * positionX); + positonY = (float) (height - (width * positonY)); + imageWidth = (float) (width * imageWidth); + imageHeight = (float) (width * imageHeight); pageStream.drawImage(image, positionX, positonY,imageWidth,imageHeight); pageStream.close();