From 8a44961c57e337681f6c86facd6ecc9a0b4dff39 Mon Sep 17 00:00:00 2001 From: Aug <17674666882@163.com> Date: Tue, 18 Feb 2025 22:05:08 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E7=94=B5=E5=AD=90=E5=90=88=E5=90=8C?= =?UTF-8?q?=E5=8A=A0=E7=AD=BE=E4=BD=8D=E7=BD=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/modules/apiService/impl/ContractServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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();