Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file.
Binary file not shown.

This file was deleted.

2 changes: 1 addition & 1 deletion Examples/GroupDocs.Conversion.Examples.Java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-conversion</artifactId>
<version>3.0.0</version>
<version>16.10.1</version>
</dependency>
</dependencies>
<build>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.groupdocs.conversion.handler.ConversionProgressEventArgs;
import com.groupdocs.conversion.handler.IConversionProgressListener;
import com.groupdocs.conversion.handler.IConversionStatusListener;

//ExStart:conversionmanager
public class ConversionManager implements IConversionProgressListener, IConversionStatusListener {
private ConversionHandler _conversionHandler = null;

Expand All @@ -37,4 +37,5 @@ public String convert(String file) throws IOException {

return _conversionHandler.<String> convert(file, option);
}
}
}
//ExEnd:conversionmanager
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class MainClass {
public static void main(String[] args) throws Throwable {

// uncomment to apply license
Utilities.applyLicenseFromFile();
//Utilities.applyLicenseFromFile();

// convert document to cells, result as file path
// Conversion.convertToCellsAsFilePath("intelligent systems.docx");
Expand All @@ -14,12 +14,10 @@ public static void main(String[] args) throws Throwable {
// Conversion.convertToCellsAsStream("intelligent systems.docx");

// convert protected document to cells and get result as file path
// Conversion.convertProtectedFilesToCellsAsPath("intelligent
// systems.docx");
// Conversion.convertProtectedFilesToCellsAsPath("intelligent systems.docx");

// convert protected document to cells and get result as stream
// Conversion.convertProtectedFilesToCellsAsStream("intelligent
// systems.docx");
// Conversion.convertProtectedFilesToCellsAsStream("intelligent systems.docx");

// convert to word and get result as path
// Conversion.convertToWordAsFilePath("intelligent systems.pdf");
Expand All @@ -28,12 +26,10 @@ public static void main(String[] args) throws Throwable {
// Conversion.convertToWordAsStream("intelligent systems.pdf");

// convert protected document to word and get result as file path
// Conversion.convertProtectedFilesToWordAsPath("intelligent
// systems.pdf");
// Conversion.convertProtectedFilesToWordAsPath("intelligent systems.pdf");

// convert protected document to word and get result as stream
// Conversion.convertProtectedFilesToWordAsStream("intelligent
// systems.pdf");
// Conversion.convertProtectedFilesToWordAsStream("intelligent systems.pdf");

// convert to html and get result as path
// Conversion.convertToHtmlAsFilePath("intelligent systems.pdf");
Expand All @@ -42,12 +38,10 @@ public static void main(String[] args) throws Throwable {
// Conversion.convertToHtmlAsStream("intelligent systems.pdf");

// convert protected document to html and get result as file path
// Conversion.convertProtectedFilesToHtmlAsPath("intelligent
// systems.pdf");
// Conversion.convertProtectedFilesToHtmlAsPath("intelligent systems.pdf");

// convert protected document to html and get result as stream
// Conversion.convertProtectedFilesToHtmlAsStream("intelligent
// systems.pdf");
// Conversion.convertProtectedFilesToHtmlAsStream("intelligent systems.pdf");

// convert to image and get result as path
// Conversion.convertToImageAsFilePath("intelligent systems.pdf");
Expand All @@ -56,12 +50,10 @@ public static void main(String[] args) throws Throwable {
// Conversion.convertToImageAsStream("intelligent systems.pdf");

// convert protected document to image and get result as image path
// Conversion.convertProtectedFilesToImageAsPath("intelligent
// systems.pdf");
// Conversion.convertProtectedFilesToImageAsPath("intelligent systems.pdf");

// convert protected document to image and get result as stream
// Conversion.convertProtectedFilesToImageAsStream("intelligent
// systems.pdf");
// Conversion.convertProtectedFilesToImageAsStream("intelligent systems.pdf");

// convert to pdf and get result as path
// Conversion.convertToPdfAsFilePath("intelligent systems.docx");
Expand All @@ -70,12 +62,10 @@ public static void main(String[] args) throws Throwable {
// Conversion.convertToPdfAsStream("intelligent systems.docx");

// convert protected document to pdf and get result as file path
// Conversion.convertProtectedFilesToPdfAsPath("intelligent
// systems.docx");
// Conversion.convertProtectedFilesToPdfAsPath("intelligent systems.docx");

// convert protected document to pdf and get result as stream
// Conversion.convertProtectedFilesToPdfAsStream("intelligent
// systems.docx");
// Conversion.convertProtectedFilesToPdfAsStream("intelligent systems.docx");

// convert to slide and get result as path
// Conversion.convertToSlideAsFilePath("intelligent systems.docx");
Expand All @@ -84,12 +74,10 @@ public static void main(String[] args) throws Throwable {
// Conversion.convertToSlideAsStream("intelligent systems.docx");

// convert protected document to slide and get result as file path
// Conversion.convertProtectedFilesToSlideAsPath("intelligent
// systems.docx");
// Conversion.convertProtectedFilesToSlideAsPath("intelligent systems.docx");

// convert protected document to slide and get result as stream
// Conversion.convertProtectedFilesToSlideAsStream("intelligent
// systems.docx");
// Conversion.convertProtectedFilesToSlideAsStream("intelligent systems.docx");

// get source document from absolute path
// CommonOperations.getSourceDocFromAbsolutePath();
Expand Down Expand Up @@ -119,7 +107,7 @@ public static void main(String[] args) throws Throwable {
// Conversion.getAvailableSaveOptionsByExtension("demo.docx");

// get available save options by file stream
// Conversion.getAvailableSaveOptionsByStream("D:/GitRepos/GroupDocs.Conversion-for-Java/Examples/GroupDocs.Conversion.Examples.Java/Data/SourceFiles/demo.docx");
// Conversion.getAvailableSaveOptionsForDocumentStream("D:/GitRepos/GroupDocs.Conversion-for-Java/Examples/GroupDocs.Conversion.Examples.Java/Data/SourceFiles/demo.docx");

// usage of PageMode when converting to PDF
// Conversion.usePageModeConvertingToPdf("The butterfly effect.pptx");
Expand All @@ -136,8 +124,7 @@ public static void main(String[] args) throws Throwable {

// Region ConversionManager
// Conversion manager
// String sourceFileName = "demo.docx"; //TODO: Put the source filename
// here
// String sourceFileName = "demo.docx"; //TODO: Put the source filename here
// String storagePath = ".";
// ConversionManager manager = new ConversionManager(storagePath);
// String result = manager.convert(sourceFileName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public static Path getProjectBaseDir() {
}

public static ConversionConfig getConfiguration(){
//ExStart:getConfiguration
try{
// Setup Conversion configuration
ConversionConfig conversionConfig = new ConversionConfig();
Expand All @@ -65,5 +66,6 @@ public static ConversionConfig getConfiguration(){
exp.printStackTrace();
return null;
}
//ExEnd:getConfiguration
}
}