Pārlūkot izejas kodu

图片尺寸修改

aQiu 3 mēneši atpakaļ
vecāks
revīzija
3fc5591599

+ 1 - 1
src/main/java/org/example/mybatisplus/Controller/IndexController.java

@@ -28,7 +28,7 @@ import java.util.*;
 public class IndexController {
     public static void main(String[] args) throws IOException {
 
-        String wordExportpath = System.getProperty("user.dir")+File.separator+ "jijinhui1.xml";
+        String wordExportpath = System.getProperty("user.dir")+File.separator+ "jijinhui1.docx";
         String pdfFilePath =System.getProperty("user.dir")+File.separator+  "download.pdf";
 
         ServiceProviderInfo serviceProviderInfo=new ServiceProviderInfo();

+ 4 - 23
src/main/java/org/example/mybatisplus/module/vo/Attachment.java

@@ -4,6 +4,7 @@ import lombok.Data;
 import org.example.mybatisplus.tools.ImageUtils;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 附件对象
@@ -12,9 +13,7 @@ public class Attachment {
     private String fileName;
     private String filePath;
     private String fileType;//附件类型,图片或pdf
-    private String width;
-    private String height;//图片显示高度
-    private List<String> base64;//图片base64
+    private List<Map> base64;//图片base64
     public String getFileName() {
         return fileName;
     }
@@ -32,8 +31,6 @@ public class Attachment {
         this.fileName = filePath.substring(filePath.lastIndexOf("/") + 1,filePath.lastIndexOf("."));
         this.base64 = ImageUtils.urlTobase64(filePath);
     }
-
-
     public String getFileType() {
         return fileType;
     }
@@ -42,27 +39,11 @@ public class Attachment {
         this.fileType = fileType;
     }
 
-    public String getWidth() {
-        return width;
-    }
-
-    public void setWidth(String width) {
-        this.width = width;
-    }
-
-    public String getHeight() {
-        return height;
-    }
-
-    public void setHeight(String height) {
-        this.height = height;
-    }
-
-    public List<String> getBase64() {
+    public List<Map> getBase64() {
         return base64;
     }
 
-    public void setBase64(List<String> base64) {
+    public void setBase64(List<Map> base64) {
         this.base64 = base64;
     }
 }

+ 40 - 12
src/main/java/org/example/mybatisplus/tools/ImageUtils.java

@@ -1,7 +1,7 @@
 package org.example.mybatisplus.tools;
 
 
-import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson.JSON;
 import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.rendering.PDFRenderer;
 import org.apache.poi.ss.usermodel.*;
@@ -21,18 +21,16 @@ import java.awt.*;
 import java.awt.image.BufferedImage;
 import java.io.*;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Base64;
+import java.util.*;
 import java.util.List;
 
 public class ImageUtils {
-    public static List<String> convertPdfToImages(String pdfUrl) throws Exception {
+    public static List<Map> convertPdfToImages(String pdfUrl) throws Exception {
         URL url = new URL(pdfUrl);
         InputStream is = url.openStream();
         PDDocument document = PDDocument.load(is);
         PDFRenderer renderer = new PDFRenderer(document);
-        List<String> images = new ArrayList<>();
+        List<Map> images = new ArrayList<>();
         for (int i = 0; i < document.getNumberOfPages(); i++) {
             BufferedImage image = renderer.renderImageWithDPI(i, 150);
             images.add(bufferedImageToBase64(image));
@@ -47,7 +45,7 @@ public class ImageUtils {
      * @param bufferedImage
      * @return
      */
-    public static String bufferedImageToBase64(BufferedImage bufferedImage) {
+    public static Map bufferedImageToBase64(BufferedImage bufferedImage) {
         ByteArrayOutputStream stream = new ByteArrayOutputStream();
         try {
             // 设置图片格式
@@ -57,7 +55,21 @@ public class ImageUtils {
         }
         byte[] bytes = Base64.getEncoder().encode(stream.toByteArray());
         String base64 = new String(bytes);
-        return base64;
+        // 读取图片
+        Map map = new HashMap();
+        map.put("width", 456.5);
+        if (bufferedImage != null) {
+            // 获取图片的宽度和高度
+            int width = bufferedImage.getWidth();
+            int height = bufferedImage.getHeight();
+            map.put("height", 456.5*(width/height));
+            System.out.println("图片宽度: " + width + " 像素");
+            System.out.println("图片高度: " + height + " 像素");
+        } else {
+            System.out.println("无法读取图片。");
+        }
+        map.put("base64", base64);
+        return map;
     }
     public static BufferedImage convertSheetToImage(Sheet sheet) {
         // 计算表格尺寸
@@ -86,13 +98,29 @@ public class ImageUtils {
         g.dispose();
         return image;
     }
-    public static String imgUrlToBase64(String imageUrl) {
+    public static Map imgUrlToBase64(String imageUrl) {
         try {
             URL url = new URL(imageUrl);
             InputStream is = url.openStream();
             byte[] bytes = is.readAllBytes(); // 从流中读取所有字节
             is.close();
-            return Base64.getEncoder().encodeToString(bytes);
+            // 读取图片
+            BufferedImage image = ImageIO.read(url);
+            Map map = new HashMap();
+            map.put("width", 456.5);
+            if (image != null) {
+                // 获取图片的宽度和高度
+                int width = image.getWidth();
+                int height = image.getHeight();
+                map.put("height", 456.5/(width/height));
+                System.out.println("图片宽度: " + width + " 像素");
+                System.out.println("图片高度: " + height + " 像素");
+                System.out.println(JSON.toJSONString(map));
+            } else {
+                System.out.println("无法读取图片。");
+            }
+            map.put("base64", Base64.getEncoder().encodeToString(bytes));
+            return map;
         } catch (Exception e) {
             e.printStackTrace();
             return null;
@@ -108,13 +136,13 @@ public class ImageUtils {
         }
         return "";
     }
-    public static List<String> urlTobase64(String url) {
+    public static List<Map> urlTobase64(String url) {
         // 常见的图片文件扩展名列表
         try {
             List<String> imageExtensions = Arrays.asList("jpg", "jpeg", "png", "gif", "bmp", "tiff", "svg");
             String ext= getFileExtension(url);
             if(imageExtensions.contains(ext)){
-                List<String> list = new ArrayList<>();
+                List<Map> list = new ArrayList<>();
                 list.add(imgUrlToBase64(url));
                 return list;
             }else if(ext.equals("pdf")){

+ 54 - 54
src/main/resources/association_template.xml

@@ -13854,9 +13854,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if registrationInfo.relatedEntitiesImage??>
        <#list registrationInfo.relatedEntitiesImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -18631,9 +18631,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if projectInfo?? && projectInfo.files?? && projectInfo.files?size gt 0>
         <#list projectInfo.files as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19206,9 +19206,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if interestConflict?? && interestConflict?size gt 0>
         <#list interestConflict as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19428,9 +19428,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.businessLicenseImage??>
        <#list documentVo.businessLicenseImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19472,9 +19472,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.legalRegistrationCertImages??>
        <#list documentVo.legalRegistrationCertImages as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19516,9 +19516,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.annualInspectionResultImage??>
        <#list documentVo.annualInspectionResultImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19560,9 +19560,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.bankCertificationImages??>
        <#list documentVo.bankCertificationImages as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19600,9 +19600,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.assessmentLevelCertImage??>
        <#list documentVo.bankCertificationImages as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19657,9 +19657,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.topDonorsListImage??>
        <#list documentVo.topDonorsListImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19700,9 +19700,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.topExpenditureListImage??>
        <#list documentVo.topExpenditureListImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19746,9 +19746,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.managementFilingFormImage??>
        <#list documentVo.managementFilingFormImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19790,9 +19790,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.jigoupinggu??>
        <#list documentVo.jigoupinggu as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19847,9 +19847,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.nianjianjieguo??>
        <#list documentVo.nianjianjieguo as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19891,9 +19891,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.branchInfoImage??>
        <#list documentVo.branchInfoImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19933,9 +19933,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.principalInfoImage??>
        <#list documentVo.principalInfoImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -19977,9 +19977,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.projectInfoImage??>
        <#list documentVo.projectInfoImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -20021,9 +20021,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.otherInfoImage??>
        <#list documentVo.otherInfoImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>
@@ -20065,9 +20065,9 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.zongti??>
        <#list documentVo.zongti as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
-        <v:fill on="f" focussize="0,0"/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
         <o:lock v:ext="edit" aspectratio="t"/>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 147 - 296
src/main/resources/foundation_template.xml


+ 30 - 30
src/main/resources/platform_template.xml

@@ -13115,8 +13115,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if registrationInfo.relatedEntitiesImage??>
                                         <#list registrationInfo.relatedEntitiesImage as item><#if item.base64??>
                                         <#list item.base64 as img>
-                                         <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+                                         <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25310,8 +25310,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                      <w:t><#if documentVo.businessLicenseImage??>
        <#list documentVo.businessLicenseImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25356,8 +25356,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.bankCertificateImage??>
        <#list documentVo.bankCertificateImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25402,8 +25402,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.isoCertificationImage??>
        <#list documentVo.isoCertificationImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25450,8 +25450,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.otherCertifications??>
        <#list documentVo.otherCertifications as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25498,8 +25498,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.securityLevelCertification??>
        <#list documentVo.securityLevelCertification as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25546,8 +25546,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.organizationalStructureImage??>
        <#list documentVo.organizationalStructureImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25613,8 +25613,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.financialInfoLink??>
        <#list documentVo.financialInfoLink as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25678,8 +25678,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                      <w:t><#if documentVo.taxDeclarationImage??>
        <#list documentVo.taxDeclarationImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25731,8 +25731,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.taxPaymentCertificateImage??>
        <#list documentVo.taxPaymentCertificateImage as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25826,8 +25826,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                      <w:t><#if documentVo.socialSecurityDetailsLink??>
        <#list documentVo.socialSecurityDetailsLink as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25889,8 +25889,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.nsxydjwj??>
        <#list documentVo.nsxydjwj as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25933,8 +25933,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.interestConflict??>
        <#list documentVo.interestConflict as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -25975,8 +25975,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.disanfangcangzhao??>
        <#list documentVo.disanfangcangzhao as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>
@@ -26019,8 +26019,8 @@ fmppOBQAc+lHWiiqAMnvSDk5FLRQFwoxRRQFz//Z
                     <w:t><#if documentVo.overallGuaranteeStatement??>
        <#list documentVo.overallGuaranteeStatement as item>
         <#if item.base64??><#list item.base64 as img>
-        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img!''}</w:binData>
-        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:auto;width:456.5pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
+        <w:pict><w:binData w:name="wordml://${item.fileName!''}">${img.base64!''}</w:binData>
+        <v:shape id="_x0000_s1032" o:spt="75" alt="" type="#_x0000_t75" style="height:${img.height!'auto'};width:${img.width!'456.5'}pt;" filled="f" o:preferrelative="t" stroked="f" coordsize="21600,21600"><v:path/>
         <v:fill on="f" focussize="0,0"/>
         <v:stroke on="f"/>
         <v:imagedata src="wordml://${item.fileName!''}" o:title="wordml://${item.fileName!''}"/>

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels