将图片转化为PDF

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/wode_ndsc/article/details/53645767
public  void test() {
String pdfPath = "D:/test.pdf";
File file = new File(pdfPath);
com.itextpdf.text.Document document=new com.itextpdf.text.Document(PageSize.A4);
try {
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(file));
document.open();
BaseFont bf0 = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);//设置中文字体 
Font font = new Font(bf0, 14.0F, 0);
font.setStyle(37); // 设置样式
font.setFamily("宋体"); // 设置字体
document.add(new Paragraph("图片转pdfdemo",font));

//添加水印图片
String imagePath = "D:/back.jpg";
PdfContentByte cb = writer.getDirectContentUnder();
com.itextpdf.text.Image image = com.itextpdf.text.Image.getInstance(imagePath);
image.setAbsolutePosition(0, 0); //设置水印图片的绝对位置
image.scaleAbsolute(595f, 842f); //设置水印图片的大小
cb.addImage(image);

document.close();


}catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();

}
展开阅读全文

vb将base64码转化为图片

05-19

VB 6.0如何将如下base64编码解析或者转换为 BMP JPG格式的图片,有没有转换函数类东东?rn 高手解答下,多谢!新号银子不多见谅!rn VB如何转换???望赐教!!!!!!!rniVBORw0KGgoAAAANSUhEUgAAAKgAAACoCAIAAAD7KTLjAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAuTSURBVHhe7dFBbiTbEQRB3f/SXxtbySEgZrKrQEptW0fkKzb/9Vv884fMHuOZkL8+xe86M3uMZ0L++hS/68zsMZ4J+etT/K4zs8d4JuSvT/G7zswe45mQvz7F7zoze4xnQv76FL/rzOwxngn561P8rjOzx3gm5N/L3/E6z4c8Mws55JBnZiG/zvM7u9d5PuSZWcghhzwzC/l1nt/Zvc7zIc/MQg455JlZ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