GroupDocs.Conversion for Java 17.7 Release Notes

Major Features

There are 14 new features, improvements and fixes in this regular monthly release. The most notable are:

  • Introduced new method for retrieving basic metadata of the source document
  • Improved handling of extension-less urls
  • Improved to HTML conversions
  • Improved HTML to Cells conversions
  • Conversion from XML-FO/XSL to PDF
  • New option to set zoom when converting to HTML
  • Conversion from Vsdm, Vssm, Vstm
  • Conversion from LaTex
  • Improved speed when converting from cells.
  • Improved memory usage
  • Returning available layouts for a CAD document
  • Option to hide PDF annotations when converting from PDF
  • Option to specify exact layout to convert from a CAD document
  • Option to specify Width and Height for the result document when converting From CAD document
  • Fixed 11 bug

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
CONVERSIONNET-1810Implement method for getting extended document informationNew Feature
CONVERSIONNET-1892Implement conversion from XML-FO/XSLNew Feature
CONVERSIONNET-1910Option to set zoom when converting to HTMLNew Feature
CONVERSIONNET-1917Conversion from Vsdm, Vssm, VstmNew Feature
CONVERSIONNET-1928Implement conversion from LaTexNew Feature
CONVERSIONNET-1756PPTX to HTML Conversion - Slide zoom level propertyNew Feature
CONVERSIONNET-1968Update DocumentInfo class to return all layouts for CAD document typesNew Feature
CONVERSIONNET-1969Implement possibility to convert specific layouts when converting from CAD documentNew Feature
CONVERSIONNET-1970Convert Pdf documents without annotationsNew Feature
CONVERSIONNET-1835Convert Html to Cells improvementsImprovement
CONVERSIONNET-1845Convert Cad to Html improvementsImprovement
CONVERSIONNET-1846Convert Note to Html improvementsImprovement
CONVERSIONNET-1840Convert Slides to Html improvementsImprovement
CONVERSIONNET-1847Convert Tasks to Html improvementsImprovement
CONVERSIONNET-1851Convert Words to Html improvements with UsePdf=true option setImprovement
CONVERSIONNET-1871Improved handling of extension-less urlsImprovement
CONVERSIONNET-1881Improve SlidesToHtml saverImprovement
CONVERSIONNET-1885Update CellsToImageSaver and CellsToPdfSaver to remove empty rows and columns before saving documentImprovement
CONVERSIONNET-1962Implement possibility to set Width and Height when converting from CAD documentImprovement
CONVERSIONNET-1678Failed to validate PDF_X_3 and PDF_X_1ABug
CONVERSIONNET-1844Converting Image to Html with UsePdf=true always use direct conversion instead converting through PdfBug
CONVERSIONNET-1676Loading Latex document from stream requires FileStreamBug
CONVERSIONNET-1884PPt to PDF Conversion - Tables borders are showing - showgridline property is also not working for thisBug
CONVERSIONJAVA-425Issue in TIF to PDF conversion in Gradle projectBug
CONVERSIONJAVA-431Word documents with tables are not converting to images properlyBug
CONVERSIONJAVA-399PDF to Image output is not as expectedBug
CONVERSIONJAVA-395License exception throws in spite of GroupDocs license was setBug
CONVERSIONJAVA-437Output image is always blank or invalid if license is not appliedBug
CONVERSIONJAVA-426Unable to set watermark color while converting document to imageBug
CONVERSIONJAVA-219Usage of PageMode when converting to PDF is not supportedBug

Public API and Backward Incompatible Changes

How to get source document metadata

String sourceFileName = "DOCXsample.docx"; //TODO: Put the source filename here 

// Setup Conversion configuration
ConversionConfig conversionConfig = new ConversionConfig();
conversionConfig.setStoragePath(storagePath);
conversionConfig.setCachePath(cachePath); 

ConversionHandler conversionHandler = new ConversionHandler(conversionConfig);
DocumentInfo documentInfo = conversionHandler.getDocumentInfo(sourceFileName); 

System.out.print("Size: %s}" + documentInfo.getSize());
System.out.print("File type: %s" + documentInfo.getFileType());
System.out.print("Pages count: %s" + documentInfo.getPageCount());
System.out.print("Last modified: %s" + documentInfo.getModifiedDate());

How to convert XML-FO/XSL to PDF

String sourceFileName = "CELLSsample.xlsx"; //TODO: Put the source filename here
String foFileName = "sample.xslt"; 

// Setup Conversion configuration
ConversionConfig conversionConfig = new ConversionConfig();
conversionConfig.setStoragePath(storagePath);
conversionConfig.setCachePath(cachePath); 

ConversionHandler conversionHandler = new ConversionHandler(conversionConfig); 

FileInputStream foStream = new FileInputStream(storagePath + "/" + foFileName); 

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.setOutputType(OutputType.String); 

XmlLoadOptions xmlLoadOptions = new XmlLoadOptions();
xmlLoadOptions.setXslFo(foStream); 

String result = conversionHandler.<String>convert(sourceFileName, xmlLoadOptions, pdfSaveOptions);
System.out.print(result);

How to set zoom when converting slides to HTML

String sourceFileName = "sample.pptx"; //TODO: Put the source filename here 

// Setup Conversion configuration
ConversionConfig conversionConfig = new ConversionConfig();
conversionConfig.setStoragePath(storagePath);
conversionConfig.setCachePath(cachePath);
ConversionHandler conversionHandler = new ConversionHandler(conversionConfig); 

HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.setOutputType(OutputType.String);
saveOptions.setZoom(150); 

String resultPath = conversionHandler.<String>convert(sourceFileName, saveOptions); 

System.out.print(resultPath);

How to get available layouts in a CAD document

String sourceFileName = "sample.dwg"; //TODO: Put the source filename here 

// Setup Conversion configuration
ConversionConfig conversionConfig = new ConversionConfig();
conversionConfig.setStoragePath(storagePath);
conversionConfig.setCachePath(cachePath);
ConversionHandler conversionHandler = new ConversionHandler(conversionConfig); 

DocumentInfo result = conversionHandler.getDocumentInfo(sourceFileName); 

for (String layer : result.getLayers()) {
System.out.println(layer);
}

How to convert specific layout from a CAD document

String sourceFileName = "sample.dwg"; //TODO: Put the source filename here
String[] layoutNames = new String[1];
layoutNames[0] = "layout-1"; 

// Setup Conversion configuration
ConversionConfig conversionConfig = new ConversionConfig();
conversionConfig.setStoragePath(storagePath);
conversionConfig.setCachePath(cachePath);
ConversionHandler conversionHandler = new ConversionHandler(conversionConfig); 

PdfSaveOptions options = new PdfSaveOptions();
options.setOutputType(OutputType.String);
options.getCadOptions().setLayoutNames(layoutNames); 

String result = conversionHandler.<String>convert(sourceFileName, options); 

System.out.print(result);

How to set specific width and height for each layout from a CAD document

String sourceFileName = "sample.dwg"; //TODO: Put the source filename here 

// Setup Conversion configuration
ConversionConfig conversionConfig = new ConversionConfig();
conversionConfig.setStoragePath(storagePath);
conversionConfig.setCachePath(cachePath); 

ConversionHandler conversionHandler = new ConversionHandler(conversionConfig); 

PdfSaveOptions options = new PdfSaveOptions();
options.setOutputType(OutputType.String);
options.getCadOptions().setWidth(800);
options.getCadOptions().setHeight(600); 

String result = conversionHandler.<String>convert(sourceFileName, options); 

System.out.print(result);

How to hide annotations when converting from PDF

String sourceFileName = "sample.pdf"; //TODO: Put the source filename here 

// Setup Conversion configuration
ConversionConfig conversionConfig = new ConversionConfig();
conversionConfig.setStoragePath(storagePath);
conversionConfig.setCachePath(cachePath);
ConversionHandler conversionHandler = new ConversionHandler(conversionConfig); 

WordsSaveOptions options = new WordsSaveOptions();
options.setOutputType(OutputType.String);
options.setHidePdfAnnotations(true); 

String result = conversionHandler.<String>convert(sourceFileName, options); 

System.out.print(result);