spire.pdf 7.4.5已发布。该版本支持根据图片的位置删除图片,并新增设置check box field的导出值的功能。此外,本次更新还增强了转换pdf到word/image/tiff/excel/pdf/a-3a等格式的功能,并且还修复了打印和合并pdf文档时出现的问题。详情请阅读以下内容。
新功能:
- 支持根据图片的位置删除图片
pdfdocument doc = new pdfdocument(input);
pdfpagebase page = doc.pages[0];
pdfimageinfo[] images = page.imagesinfo;
for (int i = 0; i < images.length; i )
{
if (images[i].bounds.contains(x, y))
//if (images[i].bounds.intersectswith(new rectanglef(x, y, width, height)))
{
page.deleteimage(images[i].image);
}
}
pdfdocument pdf = new pdfdocument();
pdf.loadfromfile(inputfile);
pdfpagebase page = pdf.pages[0];
pdfformwidget formwidget = pdf.form as pdfformwidget;
int count = 1;
foreach (pdffieldwidget field in formwidget.fieldswidget)
{
if (field is pdfcheckboxwidgetfieldwidget)
{ pdfcheckboxwidgetfieldwidget checkbox = field as pdfcheckboxwidgetfieldwidget; checkbox.setexportvalue("true" (count )); }
}
pdf.savetofile(outputfile, fileformat.pdf);
问题修复:
- 修复了转换pdf到图片,文本重叠的问题
- 修复了无法添加button field的问题
- 修复了提取图片失败的问题
- 修复了pdf打印结果不正确的问题
- 修复了打印含透明背景图片的pdf结果不正确的问题
- 修复了压缩pdf,结果文档打开报错的问题
- 修复了无法获取pdf/a-3a文档的conformance的问题
- 修复了转换pdf到流式排版的word文档,内容不正确的问题
- 修复了转换pdf到pdf/a-3a,结果文档打开报错的问题
- 修复了填充text box field,结果文档的字体被改变的问题
- 修复了提取书签名称,结果不正确的问题
- 修复了合并pdf,抛异常“object reference not set to an instance of an object”的问题
- 修复了转换pdf到excel,单元格未正确合并的问题
- 修复了提取文本抛异常“object reference not set to an instance of an object”的问题
- 修复了转换pdf到tiff,文本丢失的问题
- 修复了添加数字签名时间戳,抛异常“cryptographicexception”的问题
- 修复了设置背景图片抛异常“system.stackoverflowexception”的问题
- 修复了转换pdf到图片,内容不正确的问题
- 修复了删除图片抛异常“system.outofmemoryexception”的问题
- 修复了转换pdf到word,注解丢失的问题
- 修复了调用“createtemplate”方法抛异常“object reference not set to an instance of an object”的问题
- 修复了绘制表格抛异常“can not draw table, because there is no enough space for it”的问题
- 修复了修改自定义属性后结果文档不正确的问题
- 修复了合并pdf后书签跳转位置不正确的问题
- 修复了添加数字签名时间戳,抛异常“system.nullreferenceexception”的问题
获取spire.pdf 7.4.5请点击: