We are excited to announce the release of Spire.Presentation for Java 8.6.8. This version provides TextFindParameter.Regex enum type to support regular matching and provides new interface PdfOrdinarySignatureMaker to sign PDF. At the same time, it enhances the conversion from PDF to PDFA1A. What’s more, it also fixes some known issues such as the order of found text was inconsistent with the order of text on the page. More details are listed below.
Here is a list of changes made in this release
Category | ID | Description |
New feature | SPIREPDF-4864 SPIREPDF-5223 |
Provides TextFindParameter.Regex enum type to support regular expression matching.
document.getPages().get(0).findText("", EnumSet.of(TextFindParameter.Regex)); |
New feature | SPIREPDF-4936 SPIREPDF-5099 |
Provides new interface PdfOrdinarySignatureMaker to sign PDF.
String inputFile = "input.pdf"; String outputFile = "result.pdf"; String inputfile_img = "sign.png"; String inputFile_Pfx = "gary.pfx"; //load pdf PdfDocument doc = new PdfDocument(); doc.loadFromFile(inputFile); //load pfx file PdfCertificate x509 = new PdfCertificate(inputFile_Pfx, "e-iceblue"); PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(doc, x509); PdfSignature signature = signatureMaker.getSignature(); PdfSignatureAppearance appearance = new PdfSignatureAppearance(signature); //set ImageAndSignDetail mode appearance.setGraphicMode(GraphicMode.SignImageAndSignDetail); //set signature content appearance.setNameLabel("SSSSSSSSSS:"); signature.setName("Peekaboo"); appearance.setContactInfoLabel("Phone:"); signature.setContactInfo("028-81705109"); appearance.setDateLabel("Date: "); appearance.setLocationLabel("Address: "); signature.setLocation("ChengDu"); appearance.setReasonLabel("Cause"); signature.setReason("I am owner of ducument"); appearance.setSignImageLayout(SignImageLayout.Stretch); appearance.setSignatureImage(PdfImage.fromFile(inputfile_img)); //define signature size and position and add it in PDF for (int i = 0; i < doc.getPages().getCount(); i++) { signatureMaker.makeSignature("Peekaboo_" + (i + 1), doc.getPages().get(i), (float)doc.getPages().get(i).getActualSize().getWidth() - 340, (float)doc.getPages().get(0).getActualSize().getHeight() - 150, 270, 100, appearance); } //save document doc.saveToFile(outputFile); doc.close(); |
Bug | SPIREPDF-4768 | Optimizes the time to convert PDF to Excel in Linux environment. |
Bug | SPIREPDF-4906 | Fixes the issue that the bookmake didn't work after converting PDF to PDFA1A. |
Bug | SPIREPDF-5035 | Fixes the issue that the order of found text was inconsistent with the order of text on the page. |
Bug | SPIREPDF-5172 | Fixes the issue that caused black background after converting PDF to PDFA1A. |
Bug | SPIREPDF-5185 | Fixes the issue that the text extracted from PDF had incorrect format. |
Bug | SPIREPDF-5217 | Fixes the issue that the image was lost after merging PDF documents. |
Bug | SPIREPDF-5256 | Fixes the issue that the image covered content after converting PDF to OFD. |
Click the link below to download Spire.PDF for Java 8.6.8: