Spire.PDF for Java 10.9.0 supports extracting text from specified areas

2024-09-06 09:58:04

We're pleased to announce the release of Spire.PDF for Java 10.9.0. This version supports extracting text from specified areas, and preserving XMP data when converting PDF to PDF/A. Furthermore, some known issues that occurred when replacing, extracting text, and compressing images have been successfully fixed. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New feature SPIREPDF-6920 Adds the PreserveAllowedMetadata property to support preserving XMP data when converting PDF to PDF/A format documents.
PdfStandardsConverter convert= new PdfStandardsConverter(outputFile_pdf);
convert.getOptions().setPreserveAllowedMetadata(true);
convert.toPdfA2A(outputFile_pdfA2A);
New feature SPIREPDF-6977 Add a new interface 'PdfTextReplaceOptions.setReplacementArea(Rectangle2D rect)' to support extracting text from specified areas.
PdfPageBase page = pdf.getPages().get(0);
PdfTextReplacer replacer= new PdfTextReplacer (page);
replacer.getOptions().setReplacementArea(new Rectangle2D.Float(10, 0, 841, 150));
replacer.getOptions().setReplaceType(EnumSet.of(ReplaceActionType.WholeWord));
replacer.replaceAllText("SQL","Now SQL");
New feature SPIREPDF-6962 Adds a deprecation status indicator to the 'PdfDocument.isPasswordProtected(filename)' method.
Bug SPIREPDF-6959 Fixes the issue that the program threw a 'java.lang.NullPointerException' when replacing text.
Bug SPIREPDF-6973 Fixes the issue that the program threw a 'java.lang.NullPointerException' when extracting text.
Bug SPIREPDF-6976 Fixes the issue that the program threw a 'java.lang.ArrayIndexOutOfBoundsException' when extracting text.
Bug SPIREPDF-6992 Fixes the issue that the program threw a 'java.lang.OutOfMemoryError' when determining if a PDF document was password protected.
Bug SPIREPDF-6994 Fixes the issue that the program threw a 'java.lang.NoClassDefFoundError' when compressing images.
Bug SPIREPDF-7001 Fixes the issue that the program threw a 'java.lang.OutOfMemoryError' when merging documents after replacing text.
Click the link below to download Spire.PDF for Java 10.9.0: