Browse Source

1、电子合同加签位置调整

master
Aug 1 week ago
parent
commit
8a44961c57
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/ContractServiceImpl.java

+ 5
- 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/ContractServiceImpl.java View File

@ -409,10 +409,11 @@ public class ContractServiceImpl implements ContractService {
//获取pdf宽度 //获取pdf宽度
float width = document.getPage(pageNo).getMediaBox().getWidth(); 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.drawImage(image, positionX, positonY,imageWidth,imageHeight);
pageStream.close(); pageStream.close();


Loading…
Cancel
Save