We're pleased to announce the release of Spire.PDF 12.9.18. This version supports creating PDFs by adding content in flowing layout mode and adjusts the method for creating annotation collections. Moreover, several issues that occurred when copying pages, creating form fields, and importing FDF have also been successfully fixed. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREPDF-1 | Added support for creating PDFs by adding content in flowing layout mode. (Note: Creation only; loading or modifying existing documents is not supported.)
// Create a pdf document
PdfDocument pdf = new PdfDocument();
// Create a content builder
PdfContentBuilder builder = new PdfContentBuilder(pdf);
// Add the first section
var s1 = builder.AddSection();
s1.AddHeading1("Section One");
s1.AddParagraph("First flowing paragraph.");
// Add the second section
var s2 = builder.AddSection();
s2.AddHeading1("Section Two");
s2.AddParagraph("Second flowing paragraph.");
// Add the third section (paragraph only)
var s3 = builder.AddSection();
s3.AddParagraph("Third section, only a paragraph.");
// Add the fourth section with headings and navigation entries
var s4 = builder.AddSection();
var h1 = s4.AddHeading(1, "Alpha Chapter");
var h2 = s4.AddHeading(2, "Beta Section");
var h3 = s4.AddHeading(3, "Gamma Subsection");
h1.AsNavigationEntry("Alpha Chapter", 1);
h2.AsNavigationEntry("Beta Section", 2);
h3.AsNavigationEntry("Gamma Subsection", 3);
s4.AddParagraph("Body copy under the headings.");
// Build the document
var result = builder.Build();
// Save the document
String outputFile = "Bug_1_MultipleSections.pdf";
pdf.SaveToFile(outputFile);
pdf.Close();
|
| New Feature | - | Adjusted the method for creating annotation collections from PdfPageBase.AnnotationsV2 to PdfAnnotationCollect.Create (page).
PdfDocument doc = new PdfDocument(); PdfPageBase page = doc.Pages.Add(); RectangleF rect = new RectangleF(140, 689, 80, 1); PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(page, rect, new PointF(140, 690), new PointF(220, 690)); lineAnnotation.Contents = "This is the first line annotation"; // New way PdfAnnotationCollection anmotationCollection = PdfAnnotationCollection.Create(page); anmotationCollection.Add(lineAnnotation); // Old way //page.AnnotationsV2.Add(lineAnnotation); |
| Bug Fix | SPIREPDF-7514 | Fixed the issue where form fields were lost when copying pages using InsertPage. |
| Bug Fix | SPIREPDF-8041 | Fixed the issue where the generated tag structure PDF document could not be fully validated by PDF/UA (ISO 14289-1). |
| Bug Fix | SPIREPDF-8068 | Fixed the failure when importing FDF and adjusted the annotation import API. It is recommended to use PdfAnnotationCollection.Create(document.Pages[0]).ImportFromFdf(). |
| Bug Fix | SPIREPDF-8151 | Fixed the issue where the coordinates and size of the obtained image were incorrect. |
| Bug Fix | SPIREPDF-8152 | Fixed the issue where the field name was duplicated when creating form fields. |
Click the link to download Spire.PDF 12.9.18:
More information of Spire.PDF new release or hotfix: