Spire.Office for Java 8.10.2 学习版

Spire.Office for Java is a combination of Enterprise-Level Office Java APIs offered by E-iceblue. It includes Spire.Doc for Java, Spire.XLS for Java, Spire.Presentation for Java, Spire.PDF for Java and Spire.Barcode for Java.

Spire.Office for Java 8.10.2 学习版_第1张图片

Developers can use Spire.Office for Java to perform a wide range of office document operations in Java applications, such as opening, creating, modifying, converting and printing Word, Excel, PowerPoint and PDF documents, generating and scanning 1D&2D barcodes.

As an independent Office Java library, Spire.Office for Java doesn't need Microsoft Office to be installed on either the development or target systems.

Spire.Office for Java 8.10.2 学习版_第2张图片

Here is a list of changes made in this release
Spire.XLS for Java
Category ID Description
New feature SPIREXLS-4896 Supports verifying whether the password for restricted editing is correct.
worksheet.checkProtectionPassword(String password) 
Bug SPIREXLS-4879 Fixes the issue that the content of the document was incorrect when converting Excel to PDF.
Bug SPIREXLS-4890 Fixes the issue that the content in charts was incorrect when converting Excel to images.
SPIREXLS-4908
Bug SPIREXLS-4893 Fixes the issue that table borders were lost when converting Excel to OFD.
Bug SPIREXLS-4900 Fixes the issue that the program threw "Invalid ValidationAlertType string val" when loading an Excel file.
Bug SPIREXLS-4901 Fixes the issue that pivot table calculated fields couldn’t be added as column fields.
Bug SPIREXLS-4902 Fixes the issue that the names of pivot table calculated fields were automatically prefixed with "Sum of".
Bug SPIREXLS-4910 Fixes the issue that the program threw "java.lang.ClassException" when loading an Excel file.
Spire.PDF for Java
Category ID Description
New feature - Synchronizes the new encryption and decryption interface to Java, and supports configuring the AES encryption algorithm.
PdfEncryptionAlgorithm.AES
//Create password security policies
PdfSecurityPolicy securityPolicy = new PdfPasswordSecurityPolicy("", "123456"); 
//Set AES encryption algorithm
securityPolicy.setEncryptionAlgorithm( PdfEncryptionAlgorithm.AES_256); 
//Set document permissions (ownership), default is ForbidAll.
securityPolicy.setDocumentPrivilege(PdfDocumentPrivilege.getForbidAll());
securityPolicy.getDocumentPrivilege().setAllowDegradedPrinting(true);
securityPolicy.getDocumentPrivilege().setAllowModifyAnnotations(true);
securityPolicy.getDocumentPrivilege().setAllowAssembly(true);
securityPolicy.getDocumentPrivilege().setAllowModifyContents(true);
securityPolicy.getDocumentPrivilege().setAllowFillFormFields(true);
securityPolicy.getDocumentPrivilege().setAllowPrint(true);
pdf.encrypt(securityPolicy);
PdfDocument pdf = new PdfDocument();
//Pass the open password to open the PDF document
pdf.loadFromFile(inputFile, "1234"); 
//Decrypt
pdf.decrypt();
pdf.saveToFile(outputFile, FileFormat.PDF);
pdf.dispose();
New feature SPIREPDF-6306 Supports setting the names of existing fields.
PdfDocument document=new PdfDocument();
document.loadFromFile("input.pdf");
PdfFormWidget formWidget = (PdfFormWidget)document.getForm();
for (int i = 0; i < formWidget.getFieldsWidget().getCount(); i++)
{
    PdfField field = (PdfField)formWidget.getFieldsWidget().get(i);
    for (PdfFieldWidget widget : (Iterable) formWidget.getFieldsWidget())
    {
        if (widget.getName() == "oldName")
        {
            widget.setName("NewName");
        }
    }
}
document.saveToFile("result.pdf",FileFormat.PDF);
Bug SPIREPDF-6253 Fixes the issue that the background was incorrect after converting PDF to SVG.
SPIREPDF-6313
Bug SPIREPDF-6275 Fixes the issue that the shape color was incorrect and the content was missing after converting PDF to PPTX.
Bug SPIREPDF-6277 Fixes the issue that images were obstructed after converting PDF to PPTX.
Bug SPIREPDF-6300 Fixes the issue that the standard validation failed after converting PDF to PDFA2B.
Bug SPIREPDF-6307 Fixes the issue that stamps were lost after converting OFD to PDF.
Bug SPIREPDF-6324 Fixes the issue that the program threw "NullPointerException" when loading PDF.
Spire.Doc for Java
Category ID Description
New feature SPIREDOC-9912 Synchronizes the AppendHorizonalLine() method to Java.
paragraph.appendHorizonalLine()
New feature - Supports switching fonts that do not support drawing characters through the FontFallbackRule method in XML when converting to a non-flow layout document.
Document doc = new Document();
doc.loadFromFile(inputFile);
doc.saveFontFallbackRuleSettings(outputFile_xml);
doc.loadFontFallbackRuleSettings(outputFile_xml);
doc.saveToFile(outputFile, FileFormat.PDF);
Instructions:
If there is no XML available, first save an XML using saveFontFallbackRuleSettings and then manually edit the font replacement rules in the XML.
The rules consist of three attributes: Ranges correspond to Unicode ranges for each character; FallbackFonts correspond to the font names for substitution; BaseFonts correspond to the font names for characters in the document.
When editing the XML, it is important to note that the rules are searched from top to bottom for character matching.
After editing the XML, load the rules using the loadFontFallbackRuleSettings method.
Bug SPIREDOC-9711 Fixes the issue that the program threw "OutOfMemoryError" when using WPS rules to convert Word to PDF.
Bug SPIREDOC-9781 Fixes the issue that the embedding of "楷体_GB2312" font failed.
Bug SPIREDOC-9842 Fixes the issue that the Chinese characters garbled after converting RTF to PDF.
Bug SPIREDOC-9854 Fixes the issue that the editable area was changed after saving the Word document.
Bug SPIREDOC-9860 Fixes the issue that the editable area was changed after modifying Word documents.
Bug SPIREDOC-9862 Fixes the issue that the result of setting image zoom size was incorrect.
Bug SPIREDOC-9871 Fixes the issue that the table style was incorrect after converting Word to HTML.
Bug SPIREDOC-9880 Fixes the issue that the font size was incorrect after converting HTML to Word.
Bug SPIREDOC-9891 Fixes the issue that each value would be displayed twice after doing mail merging using executeWidthNestedRegion() method.
Bug SPIREDOC-9892 Fixes the issue that the file became much larger after converting Word to OFD.
Spire.Presentation for Java
Category ID Description
New feature SPIREPPT-2328 Supports converting PowerPoint documents to SVGZ documents.
Presentation ppt = new Presentation();
ppt.loadFromFile("input.pptx");
List bytes = ppt.saveToSVGZ();
for (int i = 0; i < bytes.size(); i++) {
FileOutputStream fileOutputStream = new FileOutputStream("slide" + i + ".svgz");
fileOutputStream.write(bytes.get(i));
fileOutputStream.flush();
fileOutputStream.close();
}
New feature SPIREPPT-2372 Supports converting specified slides to SVG documents.
Presentation ppt = new Presentation();
ppt.loadFromFile("input.pptx");
List bytes = ppt.saveToSVG(0, 36);
for (int i = 0; i < bytes.size(); i++) {
FileOutputStream fileOutputStream = new FileOutputStream("slide" + (i + 1) + ".svg");
fileOutputStream.write(bytes.get(i));
fileOutputStream.flush();
fileOutputStream.close();
}
Bug SPIREPPT-2343 Fixes the issue that the display of the content was incomplete after converting PowerPoint to PDF.
Bug SPIREPPT-2369 Fixes the issue that the hand-drawn pictures were lost after converting PowerPoint to PDF.
Bug SPIREPPT-2377 Fixes the issue that the program threw an exception java.lang.NullPointerException when loading PowerPoint documents.

你可能感兴趣的:(Spire.Office,for,Java,Spire.Office)