Spire.Office for Java 9.6.0 is released

2024-06-26 09:36:23

We are excited to announce the release of Spire.Office for Java 9.6.0. In this version, Spire.Doc for Java supports displaying a prompt message when a corresponding font is not found during conversion; Spire.Barcode for Java supports obtaining barcode information; Spire.PDF for Java enhances the conversion from PDF to OFD, Word, SVG and images. Besides, a lot of known issues are fixed successfully in this version. More details are listed below.

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

Here is a list of changes made in this release

Spire.Doc for Java

Category ID Description
New feature SPIREDOC-10465 Supports displaying a prompt message when a corresponding font is not found during Word conversion.
Document doc = ConvertUtil.GetNewEngineDocument();
doc.loadFromFile(input);
HandleDocumentSubstitutionWarnings substitutionWarningHandler = new HandleDocumentSubstitutionWarnings();
doc.setWarningCallback(substitutionWarningHandler);
doc.saveToFile(output_1);
StringBuilder sb = new StringBuilder();
Iterator iterator = substitutionWarningHandler.FontWarnings.iterator();
while(iterator.hasNext()){
    System.out.println(((WarningInfo)iterator.next()).getDescription());
}
String s = substitutionWarningHandler.FontWarnings.get(0).getDescription();
WarningSource warningSource = substitutionWarningHandler.FontWarnings.get(0).getSource();
substitutionWarningHandler.FontWarnings.clear(); 
class HandleDocumentSubstitutionWarnings implements IWarningCallback
{
    public void warning(WarningInfo info) {
        if(info.getWarningType() == WarningType.Font_Substitution)
            FontWarnings.warning(info);
    }
    public WarningInfoCollection FontWarnings = new WarningInfoCollection();
}
Bug SPIREDOC-10413 Fixes the issue that the text shifted upwards when converting a Word document to PDF.
Bug SPIREDOC-10486 Fixes the issue that the content layout was inconsistent when converting a Word document to PDF.
Bug SPIREDOC-10504 Fixes the issue that the application threw a "'td' is expected" error when converting an HTML to Word.
Bug SPIREDOC-10589 Fixes the issue that text content was partially lost when converting a Word document to an image.
Bug SPIREDOC-10592 Fixes the issue that the application threw a "String index out of range: -1" error when converting a Word document to PDF

Spire.Barcode for Java

Category ID Description
New feature SPIREBARCODE-258 The BarcodeScanner class supports obtaining barcode information, including barcode type, data value and vertex position information.
BarcodeInfo[] infos = BarcodeScanner.scanInfo("barcode.png");
Point[] loaction = infos[0].getVertexes();
BarCodeReadType barCodeReadType = infos[0].getReadType();
String dataString =  infos[0].getDataString();
New feature - The BarcodeScanner class supports scanning Aztec type.
String[] s = BarcodeScanner.scan("AZTEC.png",BarCodeType.Aztec);
New feature - The BarcodeScanner class supports scanning with more overload settings.
Public static String[] scan(BufferedImage bitmap, java.awt.Rectangle rect, BarCodeType barcodeType, boolean IncludeCheckSum)
Public static String[] scan(String fileName, BarCodeType barcodeType, boolean IncludeCheckSum)
Public static String scanOne(String fileName, BarCodeType barcodeType, boolean IncludeCheckSum)
Public static String scanOne(InputStream stream, BarCodeType barcodeType, boolean IncludeCheckSum)
New feature - Adds external use enumerations.
com.spire.barcode.publics.drawing.FontStyle
com.spire.barcode.publics.drawing.GraphicsUnit
com.spire.barcode.publics.drawing.StringAlignment
New feature - Adjustments to the IBarCodeSettings interface.

Recycled:

public java.awt.Font getTopTextFont()
public java.awt.Font getBottomTextFont()
public java.awt.Font getTextFont()

Modified:

public void setBottomTextFont(java.awt.Font value)->public void setBottomTextFont(String familyName, float fontSize)
public void setTopTextFont(java.awt.Font value)->public void setTopTextFont(String familyName, float fontSize)
public boolean showBottomText->public boolean isShowBottomText()
public void setShowBottomText(boolean value) -> public void isShowBottomText(boolean value)
public com.spire.barcode.GraphicsUnit getUnit() -> public com.spire.barcode.publics.drawing.GraphicsUnit getUnit()
public void setUnit(com.spire.barcode.GraphicsUnit value) -> public void setUnit(com.spire.barcode.publics.drawing.GraphicsUnit value)
public void setTextFont(java.awt.Font value) -> public void setTextFont(String familyName, float fontSize)
public float getLeftMargin() ->The default value adjusted from 5 to 4. 

Newly Added:

public float getTopTextMargin()  
public void setTopTextMargin(float value)
public int getAztecErrorCorrection()
public void setAztecErrorCorrection(int value)
public int getAztecLayers()
public void setAztecLayers(int value)
public DataMatrixSymbolShape getDataMatrixSymbolShape()
public void setDataMatrixSymbolShape(DataMatrixSymbolShape value)
public ITF14BorderType getITF14BearerBars() 
public void setITF14BearerBars(ITF14BorderType value)
public void setTextFont(String familyName, float fontSize, com.spire.barcode.publics.drawing.FontStyle style)
public boolean isShowStartCharAndStopChar()
public void isShowStartCharAndStopChar(boolean value)
New feature - Adjustments to the BarcodeSettings class interfaces.

Recycled:

public java.awt.Font getTextFont()
public java.awt.Font getTopTextFont() 
public java.awt.Font getBottomTextFont()

Modified:

public void setTextFont(java.awt.Font value) -> public void setTextFont(String familyName, float sizePoints)
public com.spire.barcode.GraphicsUnit getUnit() -> public com.spire.barcode.publics.drawing.GraphicsUnit getUnit()
public void setUnit(com.spire.barcode.GraphicsUnit value) -> public void setUnit(com.spire.barcode.publics.drawing.GraphicsUnit value)
public com.spire.barcode.StringAlignment getTextAlignment() -> public com.spire.barcode.publics.drawing.StringAlignment getTextAlignment()
public void setTextAlignment(com.spire.barcode.StringAlignment value) -> public void setTextAlignment(com.spire.barcode.publics.drawing.StringAlignment value)
public com.spire.barcode.StringAlignment getTopTextAligment() -> public com.spire.barcode.publics.drawing.StringAlignment getTopTextAligment()
public void setTopTextAligment(com.spire.barcode.StringAlignment value) -> public void setTopTextAligment(com.spire.barcode.publics.drawing.StringAlignment value)
public void setBottomTextFont(java.awt.Font value) -> public void setBottomTextFont(String familyName, float fontSize)
public void setTopTextFont(java.awt.Font value) -> public void setTopTextFont(String familyName, float fontSize)
public boolean showBottomText->public boolean isShowBottomText()
public void setShowBottomText(boolean value) -> public void isShowBottomText(boolean value)
public com.spire.barcode.StringAlignment getBottomTextAlignment() -> public com.spire.barcode.publics.drawing.StringAlignment getBottomTextAlignment()
public void setBottomTextAlignment(com.spire.barcode.StringAlignment value) -> public void setBottomTextAlignment(com.spire.barcode.publics.drawing.StringAlignment value)
public float getLeftMargin() ->The default value adjusted from 5 to 4. 

Newly Added:

public float getTopTextMargin()
public void setTopTextMargin(float value)
public void setTextFont(String familyName, float sizePoints, com.spire.barcode.publics.drawing.FontStyle style)
public void setTopTextFont(String familyName, float fontSize, com.spire.barcode.publics.drawing.FontStyle style)
public void setITF14BearerBars(ITF14BorderType value)
public boolean isShowStartCharAndStopChar()
public void isShowStartCharAndStopChar(boolean value)
public int getAztecLayers()
public void setAztecLayers(int value)
public int getAztecErrorCorrection()
public void setAztecErrorCorrection(int value)
public DataMatrixSymbolShape getDataMatrixSymbolShape()
public void setDataMatrixSymbolShape(DataMatrixSymbolShape value)
public void setBottomTextFont(String familyName, float fontSize, com.spire.barcode.publics.drawing.FontStyle style)

Spire.PDF for Java

Category ID Description
Bug SPIREPDF-6601 Optimizes the issue of font naming when converting PDF to SVG.
Bug SPIREPDF-6628 Fixes the issue that the application threw an exception when converting PDF to Word.
Bug SPIREPDF-6676 Optimizes the time-consuming for merging PDF files.
Bug SPIREPDF-6705 Fixes the issue that the PdfInkAnnotation added to PDF was lost after conversion to OFD.
Bug SPIREPDF-6709 Fixes the issue that the PdfInkAnnotation added to PDF was not rendered incorrectly.
Bug SPIREPDF-6747 Fixes the issue that the PdfTextExtractOptions.setExtractHiddenText(false) method didn’t take effect.
Bug SPIREPDF-6767 Fixes the issue that an error "StringIndexOutOfBoundsException" was thrown when extracting PDF tables.
Bug SPIREPDF-6781 Fixes the issue that text was overlapped after converting PDF to images.
Bug SPIREPDF-6796 Fixes the issue that an error "Width (48) and height (0) must be > 0" was thrown when compressing PDF.
Bug SPIREPDF-6810 Fixes the issue that bookmarks were lost after converting PDF to OPD.
Bug SPIREPDF-6821 Fixes the issue that content was lost when converting SVG to PDF.

Spire.XLS for Java

Category ID Description
Bug SPIREXLS-5223 Fixes the issue that the formula values were calculated incorrectly when transferring Excel to images.
Bug SPIREXLS-5238 Fixes the issue that the effect of setting "autoFitColumns()" was incorrect.
Bug SPIREXLS-5256 Fixes the issue that an exception "com.spire.xls.packages.spramg: Invalid cell name" was thrown when loading an Excel document.
Bug SPIREXLS-5263 Fixes the issue that annotations added by Microsoft 365 in Excel documents were lost after loading and saving.

Spire.Presentation for Java

Category ID Description
Bug SPIREPPT-2487 Fixes the issue that the links were missing when merging PowerPoint documents.
Bug SPIREPPT-2499 Fixes the issue that the chart dynamics were lost after loading and saving PowerPoint documents.
Bug SPIREPPT-2500 Fixes the issue that the program hanged when converting PowerPoint to PDF.
Bug SPIREPPT-2517 Fixes the issue that the application threw "DocumentEditException" when merging PowerPoint documents.
Bug SPIREPPT-2518 Fixes the issue that the fonts retrieved in shapes were incorrect.
Bug SPIREPPT-2519 Fixes the issue that the application threw "NullPointerException" when retrieving chart data sources in PowerPoint documents.
Bug SPIREPPT-2525 Fixes the issue that the application threw "outOfMemoryError" when converting PowerPoint to images.