Spire.Office for Java 8.8.3 is released

2023-08-31 06:20:53

We are excited to announce the release of Spire.Office for Java 8.8.3. In this version, Spire.Doc for Java supports setting the position of the gutter line; Spire.Presentation for Java supports selecting multiple slides and converting them into one SVG; Spire.PDF for Java adds a new interface for converting PDF to Word; Spire.XLS for Java supports setting images for the first page header and footer. In addition, a lot of known issues are fixed in this version. More details are listed below.

Click the link to download Spire.Office for Java 8.8.3:

Here is a list of changes made in this release

Spire.Doc for Java

Category ID Description
New feature SPIREDOC-4902 Support setting the position of the gutter line.
Document doc = new Document();
doc.loadFromFile(inputFile);
Section sec = doc.getSections().get(0);
sec.getPageSetup().isTopGutter(false);
sec.getPageSetup().setGutter(100f);
doc.saveToFile(outputFile, FileFormat.Docx);
New feature SPIREDOC-7838 Supports setting the spacing before/after paragraphs in line units.
paragraph.getFormat().setBeforeSpacingLines(5f);
paragraph.getFormat().setAfterSpacingLines(15f);
Bug SPIREDOC-4094 Fixed the issue that the generated table of contents was incorrect.
Bug SPIREDOC-8956 Fixed the issue that saving Docx documents failed when using IBM jdk1.6.
Bug SPIREDOC-9117
SPIREDOC-9647
Fixed the issue that fonts were not embedded when converting Word to OFD.
Bug SPIREDOC-9135 Fixed the issue that the program threw a java.lang.IllegalStateException exception when converting Word to PDF.
Bug SPIREDOC-9193 Fixed the issue that table content was lost when converting Word to PDF.
Bug SPIREDOC-9245 Fixed the issue that bookmarks cannot be retrieved after inserting section breaks.
Bug SPIREDOC-9282 Fixed the issue that extra directory tags appeared when converting Word to HTML.
Bug SPIREDOC-9331 Fixed the issue that the program threw a java.lang.ClassCastException exception when converting Word to PDF.
Bug SPIREDOC-9401 Fixed the issue that unordered list markers were missing when converting Word to PDF.
Bug SPIREDOC-9444 Fixed the issue that the position of footers was incorrect when converting Word to PDF.
Bug SPIREDOC-9459 Fixed the issue that the table of contents update failed.
Bug SPIREDOC-9464 Fixed the issue that pagination was inconsistent when converting Word to PDF.
Bug SPIREDOC-9481 Fixed the issue that header content was inconsistent when converting Word to PDF.
Bug SPIREDOC-9519 Fixed the issue that the layout of punctuation was inconsistent when converting Word to PDF.
Bug SPIREDOC-9530 Fixed the issue that field text style settings did not take effect after updating fields.
Bug SPIREDOC-9532 Fixed the issue that retrieving document information from RTF documents failed.
Bug SPIREDOC-9574 Fixed the issue that character spacing was inconsistent after loading and saving the document as a new document.
Bug SPIREDOC-9582 Fixed the issue that artistic font styles were inconsistent after loading and saving the document as a new document.
Bug SPIREDOC-9584 Fixed the issue that the position of content was inconsistent when converting Word to images.
Bug SPIREDOC-9613 Fixed the issue that the content was garbled when converting Word to PDF.
Bug SPIREDOC-9584 Fixed the issue that content positioning is inconsistent when converting Word to images.
Bug SPIREDOC-9626 Fixed the issue that decimal percentages were lost in pie charts when converting Word to images.
Bug SPIREDOC-9628 Fixed the issue that the program threw a java.lang.NullPointerException exception when loading Doc documents.
Bug SPIREDOC-9645 Fixed the issue that editable areas were not editable after replacing images in Docx documents.
Bug SPIREDOC-9687 Fixed the issue that selected checkboxes were missing when converting Word to PDF.
Bug SPIREDOC-9719 Fixed the issue that the table formatting was incorrect when converting Word to PDF.

Spire.Presentation for Java

Category ID Description
New feature SPIREPPT-2293 Supports selecting multiple slides and converting them into one SVG file.
Presentation ppt = new Presentation();
ppt.loadFromFile("input.pptx");
//saveToOneSVG(int startSlide,int endSlide)
//startSlide:Start slide index endSlide:End slide index
byte[] bytes = ppt.saveToOneSVG(10,13);
FileOutputStream fos = new FileOutputStream(new File("result.svg"));
fos.write(bytes);
fos.flush();
fos.close();
Bug SPIREPPT-2269 Fixes the issue that the content was cropped after saving a shape to an image.
Bug SPIREPPT-2283 Fixes the issue that the text layout is messed up after converting PowerPoint to images.
Bug SPIREPPT-2295 Fixes the issue that image placeholders could not be obtained after deleting all nodes in PICTURE_ORGANIZATION_CHART and then manually adding images.
Bug SPIREPPT-2301 Fixes the issue that txt attachments cannot be opened after merging PowerPoint files.
Bug SPIREPPT-2312 Fixes the issue that the animation styles and timing effects lost when loading a document and saving it to a new one.
Bug SPIREPPT-2316 Fixes the issue that the program threw "java.lang.NullPointerException" exception when converting PPT to PDF.
Bug SPIREPPT-2319 Fixes the issue that the program hung when converting PPT to PDF.

Spire.XLS for Java

Category ID Description
New feature SPIREXLS-4797 Supports setting images for the first page header and footer.
//Set image for first page header
worksheet.getPageSetup().setFirstLeftHeaderImage(img_LFH);
worksheet.getPageSetup().setCenterHeaderImage(img_LCH);
worksheet.getPageSetup().setRightHeaderImage(img_LRH);
//Set image for first page footer
worksheet.getPageSetup().setLeftFooterImage(img_LFF);
worksheet.getPageSetup().setCenterFooterImage(img_LCF);
worksheet.getPageSetup().setRightHeaderImage(img_LRF);
//Set image size
worksheet.getPageSetup().setFirstLeftHeaderPictureHeight(50);
worksheet.getPageSetup().setFirstLeftHeaderPictureWidth(50);
worksheet.getPageSetup().setFirstCenterHeaderPictureHeight(50);
worksheet.getPageSetup().setFirstCenterHeaderPictureWidth(50);
worksheet.getPageSetup().setFirstRightHeaderPictureHeight(50);
worksheet.getPageSetup().setFirstRightHeaderPictureWidth(50);
New feature SPIREXLS-4831 Supports getting the hyperlinks of pictures.
ExcelPicture picture = sheet.getPictures().get(0);
HyperLink link = picture.getHyperLink();
String address = link.getAddress();
Bug SPIREXLS-4078 Fixes the issue that Excel files saved in Tomcat had garbled formulas.
Bug SPIREXLS-4737 Fixes the issue that opening files converted from Excel to PDF in Adobe resulted in an error.
Bug SPIREXLS-4770 Fixes the issue that the content formatting of files converted from Excel to images was incorrect.
Bug SPIREXLS-4800 Fixes the issue that setting the maximum row was not taking effect.
Bug SPIREXLS-4821
SPIREXLS-4840
Fixes the issue that the program threw "NullPointerException" when converting Excel to PDF.
Bug SPIREXLS-4822 Fixes the issue that Excel files saved in WinServer2012 had garbled content in dropdown menus.
Bug SPIREXLS-4829 Fixes the issue that the program threw "NullPointerException" when loading Excel files created with the new version of WPS.
Bug SPIREXLS-4837
SPIREXLS-4839
Fixes the issue that the program threw "NullPointerException" when loading Excel files.

Spire.PDF for Java

Category ID Description
New feature SPIREPDF-5843
SPIREPDF-5854
Adds a new interface for converting PDF to Word.
PdfToWordConverter converter = new PdfToWordConverter(inputPath); 
converter.saveToDocx(OutputPath);
converter.dispose();
New feature SPIREPDF-6115 Adds a new interface for setting the "crop box".
PdfDocument pdfDocument = new PdfDocument(); 
pdfDocument.loadFromFile("input.pdf"); 
PdfPageBase pdfPageBase = pdfDocument.getPages().get(0); 
// setting the "crop box". 
pdfPageBase.setCropBox(new Rectangle2D.Float(0,0,400,800));
pdfDocument.saveToFile("output.pdf", FileFormat.PDF);
New feature SPIREPDF-6167 Adds a new interface for setting margins when printing documents.
PdfDocument pdf = new PdfDocument();
pdf.loadFromFile(inputFile);
PrintSettings setting = pdf.getPrintSettings();
pdf.getPrintSettings().setPaperMargins(30,30, 30, 30);
setting.setPrinter("Microsoft XPS Document Writer");
pdf.getPrintSettings().printToFile(outputFile);
pdf.print();
pdf.close();
Bug SPIREPDF-3556 Fixes the issue that the chart axis was missing coordinates after converting PDF to Word.
Bug SPIREPDF-4980 Fixes the issue that the content was incorrect after converting PDF to Word using flow layout.
Bug SPIREPDF-5047 Fixes the issue that the font name with multiple suffixes after converting PDF to Word.
Bug SPIREPDF-5067 Fixes the issue that the characters garbled when viewing converted PDF to Word with Office 365.
Bug SPIREPDF-6085 Fixes the issue that the application threw exception: java.lang.NullPointerException when loading a PDF.
Bug SPIREPDF-6102 Fixes the issue that viewing the converted PDFA document would prompt for missing fonts.
Bug SPIREPDF-6104 Fixes the issue that the borders were cropped after converting PDF to SVG.
Bug SPIREPDF-6105 Fixes the issue that the PdfDocument.setCustomFontsFolders() method was not effective when converting PDF to PDFA.
Bug SPIREPDF-6112 Fixes the issue that the application threw excepttion:"PDF file structure is not valid" when loading a PDF.
Bug SPIREPDF-6147
SPIREPDF-6175
Fixes the issue that the bold font effect was unclear when converting PDF to OFD.
Bug SPIREPDF-6154 Fixes the issue that the application threw exception: "For input string: 'e-'" when merging documents and converting to PDFA1A.
Bug SPIREPDF-6187 Fixes the issue that the application threw NullPointerException when rotating a previously rotated document back to its original position.
Bug SPIREPDF-6104 Fixes the issue that some borders of charts were cropped after converting PDF to SVG.
Bug SPIREPDF-6133 Fixes the issue that the cell merge of the same column was incorrect after converting PDF to Excel.
Bug SPIREPDF-6209 Fixes the issue that setting fonts for text boxes didn't take effect.