News Category

Spire.PDF 8.1.4 supports converting OFD to PDF and image

2022-01-19 08:54:23

We are glad to announce the release of Spire.PDF 8.1.4. This version supports converting OFD to PDF and image, and support setting layer print properties, as well as supports adding InkAnnotation. In addition, it fixes some known issues such as the extracted text was incorrect. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature - Supports converting OFD to PDF and image.
OfdConverter converter = new OfdConverter("inputFile");
converter.ToPdf("outputFile");
converter.ToImage(pageIndex);
converter.ToImage(pageIndex, dpiX, dpiY); 
New feature SPIREPDF-2732 Supports setting layer print properties.
converter.ToLinearizedPdf("Linearized.pdf");
 PdfDocument pdfDoc = new PdfDocument();
 pdfDoc.LoadFromFile(inputFile);
 Spire.Pdf.PdfPageBase page;
 pdfDoc.FileInfo.IncrementalUpdate = false;
 string MvAddedlaverName1 = "GorLaverPagel";
 for (int iPage = 0; (iPage <= (pdfDoc.Pages.Count - 1)); iPage++)
 {
     page = pdfDoc.Pages[iPage];
     Spire.Pdf.Graphics.Layer.PdfLayer wtLaver_1 = pdfDoc.Layers.AddLayer(MvAddedlaverName1);
     wtLaver_1.ViewState = LayerViewState.Allways;
     wtLaver_1.PrintState = LayerPrintState.Nerver;
     wtLaver_1.ExportState = LayerExportState.ExportWhenVisible;
     Spire.Pdf.Graphics.PdfCanvas gPdfCanvas_1 = wtLaver_1.CreateGraphics(page.Canvas);
     gPdfCanvas_1.SetTransparency(0.4f);
     gPdfCanvas_1.DrawString(tStatusString, new PdfFont(PdfFontFamily.Helvetica, 28), new PdfSolidBrush(Color.Black), new System.Drawing.PointF(((page.Size.Width - 265) - (524 / 2)), (page.Size.Height - (50 - 127))));
     wtLaver_1.CreateGraphics(gPdfCanvas_1);
     gPdfCanvas_1.SetTransparency(1);
 }
 pdfDoc.SaveToFile(outputFile, FileFormat.PDF);
 pdfDoc.Close();
New feature SPIREPDF-2871 Supports adding InkAnnotation.
System.Collections.Generic.List<int[]> inkList = new System.Collections.Generic.List<int[]>();
 int[] intPoints = new int[]
 {
       100,800,
       200,800,
       200,700
 };
 inkList.Add(intPoints);
 PdfInkAnnotation ia = new PdfInkAnnotation(inkList);
 ia.Color = Color.LightBlue;
 ia.Border.Width = 12;
 ia.Opacity = 0.3f;
 ia.Text = "e-iceblue";
 pdfPage.AnnotationsWidget.Add(ia);
Bug SPIREPDF-974 Fixes the issue that it was failed to add .emf file to PDF.
Bug SPIREPDF-3457 Fixes the issue that the items of XfaChoiceListField was unable to get.
Bug SPIREPDF-4821 Fixes the issue that the extracted text was incorrect.
Bug SPIREPDF-4849 Fixes the issue that the content was lost after replacing text.
Bug SPIREPDF-4853 Fixes the issue that the position of the found text was incorrect.
Bug SPIREPDF-4855 Fixes the issue that the custom time of the digital signature was incorrect.
Bug SPIREPDF-4861 Fixes the issue that some content was lost after copying annotation to other page.
Bug SPIREPDF-4871 Fixes the issue that the added PdfRubberStampAnnotation didn't display in output PDF.
Bug SPIREPDF-4875 Fixes the issue that the application threw "System.ArgumentOutOfRangeException" after setting grid RowSpan.
Click the link to download Spire.PDF 8.1.4
More information of Spire.PDF new release or hotfix: