pdf转base64
byte[] Bytes= FileUtils.readFileToByteArray(new File(filePath));
String BASE64 = new String(Base64.encode(Bytes), "UTF-8");
base64转为pdf
byte[] bytes = decoder.decodeBuffer(base64Content);//base64编码内容转换为字节数组
IoUtil.write( map.get("filePath").toString(), bytes );
另一种
/**
* Description: 将base64编码内容转换为Pdf
* @param base64编码内容,文件的存储路径(含文件名)
* @Author fuyuwei
* Create Date: 2015年7月30日 上午9:40:23
*/
public static void base64StringToPdf(String base64Content,String filePath){
BASE64Decoder decoder = new BASE64Decoder();
BufferedInputStream bis = null;
FileOutputStream fos = null;
BufferedOutputStream bos = null;
try {
byte[] bytes = decoder.decodeBuffer(base64Content);//base64编码内容转换为字节数组
ByteArrayInputStream byteInputStream = new ByteArrayInputStream(bytes);
bis = new