import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.PdfStamper;
import com.itextpdf.text.pdf.PdfWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
/**
* @author zly
* @since 2020/8/15 9:35
*/
public class PdfEncryption {
private final static Logger logger = LoggerFactory.getLogger(PdfEncryption.class);
/**
* pdf加密
*
* @param userPassword 用户密码
* @param ownerPassword 所有者权限
* @param pdfPathAndName 源文件路径
* @param fileOutPutPathAndName 加完密文件路径
*/
public static String pdfEncryption(String userPassword, String ownerPassword, String pdfPathAndName, String fileOutPutPathAndName) {
logger.info("-