News Category

Spire.PDF 8.6.1 supports setting the author and subject for PDFLineAnnotation

2022-06-08 09:29:35

We are glad to announce the release of Spire.PDF 8.6.1. This version supports setting the author and subject for PDFLineAnnotation, and supports setting the ForeColor for CheckBox field. It also enhances the conversion from OFD to PDF. In addition, it fixes some known issues such as the field text was incorrect after printing. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREPDF-5095 Supports setting the author and subject for PDFLineAnnotation.
if (annotation is PdfLineAnnotationWidget)
{
    PdfLineAnnotationWidget lineAnn = annotation as PdfLineAnnotationWidget;
    //PdfLineAnnotation lineAnn = annotation as PdfLineAnnotation;
    lineAnn.Author = "Author_test";
    lineAnn.Subject = "Subject_test";
}
New feature SPIREPDF-5148 Supports setting the ForeColor for CheckBox field.
checkboxField.ForeColor = new PdfRGBColor(Color.Red);
New feature SPIREPDF-5154 Adjusts the interface find.ApplyHighLight()to find.HighLight(), and this method improves the highlighting effect.
New feature - Supports creating tagged structure PDF.
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");
Bug SPIREPDF-1269 Fixes the issue that caused incorrect field text after printing.
Bug SPIREPDF-1280 Improves the time to convert PDF to image.
Bug SPIREPDF-1603
SPIREPDF-5022
Fixes the issue that failed to get the value from XFA field.
Bug SPIREPDF-4990 Optimizes the memory consumption when manipulating PDF and resultant document size.
Bug SPIREPDF-5018 Fixes the issue that failed to find the text that contains superscripts..
Bug SPIREPDF-5041 Fixes the issue that the application threw the "post table issue" when converting PDF to Images.
Bug SPIREPDF-5057 Fixes the issue that failed to replace image in PDF.
Bug SPIREPDF-5079 Fixes the issue that failed to delete image from PDF.
Bug SPIREPDF-5119 Fixes the issue that caused incorrect format after converting PDF to Image.
Bug SPIREPDF-5142 Fixes the issue that failed to find vertical text in PDF.
Bug SPIREPDF-5148 Supports setting the ForeColor for CheckBox field.
Bug SPIREPDF-5155 Fixes the issue that caused incorrect text spacing after converting OFD to PDF.
Bug SPIREPDF-5165 Fxies the issue that the application threw the "NullReferenceException" when filling image in PdfButton field.
Bug SPIREPDF-5168 Fixes the issue that the PDFViewer failed to load the PDF stream converted from OFD.
Bug SPIREPDF-5171 Synchronizes the cell.getStyle().setCellPadding interface in JAVA (setting the padding of a cell) to .NET.
Bug SPIREPDF-5175 Fixes the issue that characters were incorrect after printing PDF.
Bug SPIREPDF-5177 Fixes the issue that setting the WordWrap for text in grid didn't take effect.
Bug SPIREPDF-5179
SPIREPDF-5227
Fixes the issue that the size of image stamp became large after converting OFD to PDF.
Bug SPIREPDF-5183 Fixes the issue that the application threw "The conversion provider cann't be found" exception when converting HTML to PDF using QT plugin.
Bug SPIREPDF-5184 Fixes the issue that the image was lost after converting SVG to PDF.
Bug SPIREPDF-5199 Fixes the issue that the image stamp was lost after converting OFD to PDF.
Bug SPIREPDF-5207 Fixes the issue that the text overlapped after adding in grid.
Click the link to download Spire.PDF 8.6.1:
More information of Spire.PDF new release or hotfix: