Spire.PDF 8.6.1已发布。该版本支持设置PDFLineAnnotation的作者和主题,支持设置复选框的ForeColor属性,并增强了OPD到PDF的转换功能。此外还修复了打印PDF,域值不正确等已知问题。详情请阅读以下内容。
新功能:
- 支持设置PDFLineAnnotation的作者和主题。
- 支持设置复选框的ForeColor属性。
- 调整了查找文本的接口find.ApplyHighLight()为 find.HighLight(),且此方法改善了高亮效果
- 支持创建tagged结构PDF
if (annotation is PdfLineAnnotationWidget)
{
PdfLineAnnotationWidget lineAnn = annotation as PdfLineAnnotationWidget;
//PdfLineAnnotation lineAnn = annotation as PdfLineAnnotation;
lineAnn.Author = "Author_test";
lineAnn.Subject = "Subject_test";
}
checkboxField.ForeColor = new PdfRGBColor(Color.Red);
PdfStringFormat format = new PdfStringFormat();
PdfTrueTypeFont font = new PdfTrueTypeFont(new System.Drawing.Font("Times New Roman", 10));
PdfPen pen = PdfPens.Black;
PdfSolidBrush brush = new PdfSolidBrush(Color.Black);
PdfDocument doc = new PdfDocument("HelloWord.pdf");
PdfLogicalStructure tree = PdfLogicalStructure.CreateLogicalStructure(doc);
PdfStructureElement article = tree.AppendChildElement(PdfStandardStructTypes.Article);
article.Title = "create tagged pdf";
PdfStructureElement paragraph1 = article.AppendChildElement(PdfStandardStructTypes.Paragraph);
paragraph1.Title = "text paragraph1";
int mcid = 0;
paragraph1.BeginMarkedContentSequence(doc.Pages[0].Canvas, "paragraph1", mcid);
doc.Pages[0].Canvas.DrawString("paragraph1: PDF’s logical structure facilities (PDF 1.3) provide a mechanism for " +
"incorporating structural information about a document’s content into a PDF file. Such information might include, " +
"for example, the organization of the document into chapters and sections or the identification of special elements " +
"such as figures, tables, and footnotes. The logical structure facilities are extensible, allowing applications that " +
"produce PDF files to choose what structural information to include and how to represent it, while enabling PDF " +
"consumers to navigate a file without knowing the producer’s structural conventions.",
font, pen, brush, new Rectangle(40, 200, 480, 80), format);
paragraph1.EndMarkedContentSequence(doc.Pages[0].Canvas);
paragraph1.ReferenceContent(doc.Pages[0], mcid);
PdfStructureElement paragraph2 = article.AppendChildElement(PdfStandardStructTypes.Paragraph);
paragraph2.Title = "text paragraph2";
mcid = 1;
paragraph2.BeginMarkedContentSequence(doc.Pages[0].Canvas, "paragraph2", mcid);
doc.Pages[0].Canvas.DrawString("paragraph2: PDF logical structure shares basic features with standard document markup languages" +
" such as HTML, SGML, and XML. A document’s logical structure is expressed as a hierarchy of structure elements, each" +
" represented by a dictionary object. Like their counterparts in other markup languages, PDF structure elements can" +
" have content and attributes. In PDF, rendered document content takes over the role occupied by text in HTML, SGML, and XML.",
font, pen, brush, new Rectangle(40, 280, 480, 60), format);
paragraph2.EndMarkedContentSequence(doc.Pages[0].Canvas);
paragraph2.ReferenceContent(doc.Pages[0], mcid);
doc.SaveToFile("Tagged.pdf");
问题修复:
- 修复了打印PDF,域值不正确的问题。
- 提高了转换PDF到图片的时间。
- 修复了获取XFA域值失败的问题。
- 优化了操作PDF文档的内存消耗以及结果文档大小。
- 修复了查找含有上标的文本失败的问题。
- 修复了转换PDF到图片,程序抛异常“post table issue”。
- 修复了替换PDF中的图片不正确的问题。
- 修复了删除图片不正确的问题。
- 修复了转换PDF到图片格式不正确的的问题。
- 修复了查找垂直文本失败的问题。
- 修复了转换OFD到PDF,文本间隔不正确的问题。
- 修复了填充图片到PDFButton域,程序抛空指针异常。
- 修复了转换OFD到PDF流,PDFViewer加载流报错的问题。
- 同步JAVA中的cell.getStyle().setCellPadding接口(设置某个单元格的内边距)到.NET。
- 修复了打印PDF,字符不正确的问题。
- 修复了设置grid的换行格式不生效的问题。
- 修复了转换OFD到PDF,图章尺寸变大的问题。
- 修复了转换使用QT插件转换HTML到PDF,程序抛插件找不到的问题。
- 修复了转换SVG到PDF,图片丢失的问题。
- 修复了转换OFD到PDF,图章丢失的问题。
- 修复了添加文本到grid,文本重叠的问题。
获取Spire.PDF 8.6.1请点击: