GroupDocs.Conversion for Java 23.4 Release Notes

Major Features

There are 10+ features, improvements, and bug fixes in this release, the most notable are:

  • Conversion from PUB (Microsoft Publisher) file format to PDF format
  • Improved performance of PDF to XLSM conversion
  • Conversion to AZW3 format
  • Options to extract audio from video
  • Improved document type classification
  • Improved conversion from composite documents
  • Conversions between font formats
  • Improved conversions from the ICO format
  • Improved spreadsheet to word-processing document conversions
  • Improved logging during conversion
  • Conversions to MOBI format.
  • New load options when converting spreadsheets - Specify desired sheets by their index number.
  • Improved file type detection from a stream

Full List of Issues Covering all Changes in this Release

KeyCategorySummary
CONVERSIONNET‑5257Feature.PUB file to PDF conversion support
CONVERSIONNET‑5527FeatureChange the producer of PDF file
CONVERSIONNET‑5432FeatureImplement conversion to Amazon Kindle AZW3 format
CONVERSIONNET‑5643FeatureVideo to Audio conversion
CONVERSIONNET‑5407FeatureImplemented font formats conversion
CONVERSIONNET‑5803FeatureImplement conversion to MOBI format
CONVERSIONNET‑5833FeatureSpecify converted worksheets by indexes
CONVERSIONNET‑5414EnhancementConversion from PDF to XLSM is freezing
CONVERSIONNET‑5700EnhancementImproved conversions from composite documents: PST/OST, MBOX, and archives
CONVERSIONNET‑5517EnhancementImproved document types classification following the File Format Guide
CONVERSIONNET‑5746EnhancementImprove Ico format conversion
CONVERSIONNET‑5748EnhancementImprove Spreadsheet to WordProcessing document conversion
CONVERSIONNET‑5724EnhancementReturn list of available folders from PST/OST and other composite documents in document info class
CONVERSIONNET‑5750EnhancementImprove Spreadsheet to Presentation document conversion
CONVERSIONNET‑5732EnhancementEML with attachments to PDF conversion issue
CONVERSIONNET‑5761EnhancementImprove logging during conversion
CONVERSIONNET‑5837EnhancementDo not process hidden worksheets when convert from spreadsheet
CONVERSIONNET‑5825EnhancementImprove FileType from Stream detection
CONVERSIONNET‑5808EnhancementReturn meaningful data in DocumentInfo classes that have IEnumerable properties when accessed through the indexer
CONVERSIONNET‑5609FixLarge temp files are created during conversion to image on macOS
CONVERSIONNET‑4976FixCannot convert PDF to Excel
CONVERSIONNET‑5558FixError converting WEBP to JPG
CONVERSIONNET‑5234FixCannot convert ASE to 3DS and OBJ
CONVERSIONNET‑5233FixCannot convert from 3D VRML file format
CONVERSIONNET‑5232FixCannot convert from 3D X file format
CONVERSIONNET‑5231FixCannot convert from 3D GLTF file format
CONVERSIONNET‑5726FixWhen converting from PST/OST no files are processed
CONVERSIONNET‑5560FixKeeping the hyperlink (text with link) format when converting PDF to PPTX
CONVERSIONNET‑4742FixPDF to image conversion issue
CONVERSIONNET‑5415FixEvaluation tag when converting to Image
CONVERSIONNET‑5457FixParticular PDF to PNG conversion crashes
CONVERSIONNET‑5563FixPDF to PNG: Path conversion requested exception
CONVERSIONNET‑5280FixWord to PDF conversion issue
CONVERSIONNET‑5736FixConverter.GetAllPossibleConversions method returns enum with duplicates
CONVERSIONNET‑5477FixRegression: EPUB to HTML raises “CorruptOrDamagedFileException”
CONVERSIONNET‑5698FixCannot convert from Note on macOS due to missing fonts
CONVERSIONNET‑5831FixError while Converting XLSX to PDF: Same key added
CONVERSIONNET‑5823FixConverting Numbers to Pptx produce broken result
CONVERSIONNET‑5794FixConverting particular Xlsx to Pptx produce broken result
CONVERSIONNET‑5341FixDWG to PDF conversion - Its messing the image
CONVERSIONNET‑5835FixXSLX to PDF: #REF! instead of 0
CONVERSIONNET‑5836FixXLS to PDF: ConversionNotSupportedException

Conversion to AZW3 format

To convert any of the supported file types to the AZW3 file type, just specify it in the Format property of the EBookConvertOptions class instance:

// Load the source PDF file
try (Converter converter = new Converter("sample.pdf")) {
    // Set the convert options for AZW3 format
    EBookConvertOptions options = new EBookConvertOptions();
    options.setFormat(EBookFileType.Azw3);
    // Convert to AZW3 format
    converter.convert("converted.azw3", options);
}

Extracting audio tracks from video formats

Extracting an audio track from a video is similar to converting video, however, you need to set the ExtractAudioOnly property to true and specify the desired output format in the AudioFormat property:

// Load the source AVI file
VideoLoadOptions loadOptions = new VideoLoadOptions();
loadOptions.setVideoConnector(new VideoConnector());
try(Converter converter = new Converter("sample_with_audio.avi", () -> loadOptions)){
  // Set the convert options
  VideoConvertOptions options = new VideoConvertOptions();
  options.setExtractAudioOnly(true);
  options.setAudioFormat(AudioFileType.Ogg);
  // Convert to audio file
  converter.convert("extracted_audio.ogg", options);
}

Conversion between font formats

Now you can convert your font file from one format into another. For example, the CFF to TTF conversion code snippet will look like this:


// Load the source font file
try (Converter converter = new Converter("Lato-Regular.cff")) {
  // Set the convert options
  FontConvertOptions options = new FontConvertOptions
  options.setFormat(FontFileType.Ttf);
  // Convert to TTF format
  converter.convert("Lato-Regular.ttf", options);
}

Conversion to MOBI format

To convert any of the supported file types to the MOBI file type, just specify it in the Format property of the EBookConvertOptions class instance:

// Load the source PDF file
try (Converter converter = new Converter("sample.pdf")) {
  // Set the convert options for MOBI format
  EBookConvertOptions options = new EBookConvertOptions();
  options.setFormat(EBookFileType.Mobi);
  // Convert to MOBI format
  converter.convert("converted.mobi", options);
}

Specify converted worksheets by their indexes

When converting spreadsheets, you can now specify the desired sheets by their zero-based index numbers. To do this use the SheetIndexes property of the SpreadsheetLoadOptions class:

LoadOptionsProvider getLoadOptions = () -> {
  SpreadsheetLoadOptions options = new SpreadsheetLoadOptions();
  options.setSheetIndexes(Arrays.asList(0, 2));
  options.setOnePagePerSheet(true);
  return options;
};
try (Converter converter = new Converter("sample.xlsx", getLoadOptions)) {
  PdfConvertOptions options = new PdfConvertOptions();
  converter.convert("converted.pdf", options);
}

Public API and backward incompatible changes

  1. Introduced a new file type: WebFileType.
  2. The PersonalStorageFileType file type becomes deprecated. Please use the EmailFileType or the DatabaseFileType types instead.
  3. The MarkupFileType file type becomes deprecated. Please use the WebFileType type instead.
  4. The DataFileType file type becomes deprecated. Please use the WebFileType type instead.
  5. Introduced new ExtractAudioOnly property of the VideoConvertOptions class.
  6. Introduced new AudioFormat property of the VideoConvertOptions class.
  7. Introduced new PersonalStorageFolderInfo class:
//Personal Storage Folder info

public class PersonalStorageFolderInfo {

  //Name of the folder

  public String  getName();

  //Count of the items in the folder

  public int getItemsCount();

}
  1. Changed the Folders property in the PersonalStorageDocumentInfo class:

    before v23.4

    public List<String> getFolders();
    

    from v23.4 and greater

    public List<PersonalStorageFolderInfo> getFolders();
    
  2. Introduced new SheetIndexes property of the SpreadsheetLoadOptions class:

   /**
   * List of sheet indexes to convert.
   * The indexes must be zero-based
   */
   public List<Integer> getSheetIndexes();
   public void getSheetIndexes(List<Integer> indexes);