package com.trade.service.filestorage.util.watermark;

import java.io.File;
import java.io.InputStream;

import com.trade.common.exception.ServiceException;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;


/**
 * @description: 制作水印接口
 * @Author: wanglang
 * @Date: 2023/3/3 9:29
 * @Version: 1.0
 */
public interface MakeWaterMark {

    /**
     * 图片水印 -- word\pdf(word需转pdf)
     * 
     * @param strSourcePdf
     * @param strTargetPdf
     * @param pngMark
     * @throws Exception
     */
    void pictureMarkForPdf(String strSourcePdf, String strTargetPdf, PngMark pngMark) throws ServiceException;

    /**
     * 文本水印 -- word\pdf(word需转pdf)
     * 
     * @param strSourcePdf
     * @param strTargetPdf
     * @param textMark
     * @throws Exception
     */
    void textMarkForPdf(String strSourcePdf, String strTargetPdf, TextMark textMark) throws ServiceException;

    /**
     * 图片水印--excel
     * 
     * @param workbook
     * @param pngMark
     * @param strSourceExcel
     * @param strTargetExcel 预览或者下载 需删除该路径文件
     * @throws ServiceException
     */
    void pictureMarkForExcel(XSSFWorkbook workbook, String strSourceExcel, String strTargetExcel, PngMark pngMark)
            throws ServiceException;

    /**
     * 文本水印--excel
     * 
     * @param workbook
     * @param textMark
     * @param strSourceExcel
     * @param strTargetExcel 预览或者下载 需删除该路径文件
     * @throws ServiceException
     */
    void textMarkForExcel(XSSFWorkbook workbook, String strSourceExcel, String strTargetExcel, TextMark textMark)
            throws ServiceException;

    /**
     * 图片水印--html
     * 
     * @param path html路径
     * @param pngMark
     */
    File pictureMarkForHtml(String path, PngMark pngMark) throws ServiceException;

    /**
     * 图片水印--html
     *
     * @param inputStream html流
     * @param pngMark
     * @param fileName
     * @return 文件
     * @throws ServiceException
     */
    File pictureMarkForHtml(InputStream inputStream, PngMark pngMark, String fileName) throws ServiceException;

    /**
     * 文本水印--html
     *
     * @param path html路径
     * @param textMark
     */
    File textMarkForHtml(String path, TextMark textMark) throws ServiceException;

    /**
     * 文本水印--html
     *
     * @param file
     * @param textMark
     */
    File textMarkForHtml(File file, TextMark textMark) throws ServiceException;

    /**
     * 文本水印--html
     *
     * @param inputStream html流
     * @param textMark
     * @param fileName
     * @return 文件
     * @throws ServiceException
     */
    File textMarkForHtml(InputStream inputStream, TextMark textMark, String fileName) throws ServiceException;

    /**
     * 文本水印--Picture
     * 
     * @param strSourcePdf
     * @param strTargetPdf
     * @param textMark
     * @return
     * @throws ServiceException
     */
    void textMarkForPicture(String strSourcePdf, String strTargetPdf, TextMark textMark) throws ServiceException;

    /**
     * 文本水印--Picture
     *
     * @param inputStream 文件流
     * @param strTargetPdf 目标文件路径
     * @param textMark 文字水印
     */
    void textMarkForPicture(InputStream inputStream, String strTargetPdf, TextMark textMark) throws ServiceException;
}
