Free Support Forum - groupdocs.com

ConversionHandler - File not found


#1
I just started using the Groupdocs.Conversion api. I am trying to convert a pdf to spreadsheet using the code below:

ConversionHandler ConversionHandler = new ConversionHandler(Configuration());
CellsSaveOptions saveOptions = new CellsSaveOptions();
saveOptions.setOutputType(OutputType.String);
String Converted_Document_Path = ConversionHandler.convert"./Data/input/Statement_Sam_red.pdf", saveOptions);
System.out.println("Converted filepath: "+ Converted_Document_Path);

When I run the application it gives me the error "File not found" but I am able to access the file using JavaIO methods. Am I doing something wrong here ?



#2

@s.paul4,


Thanks for trying GroupDocs.Conversion for Java and posting your concerns.
String Converted_Document_Path = ConversionHandler.convert"./Data/input/Statement_Sam_red.pdf", saveOptions);
Can you please show us your configurations? In our case, we successfully are able to generate output using following code:

ConversionHandler conversionHandler = new ConversionHandler(Utilities.getConfiguration());
CellsSaveOptions saveOption = new CellsSaveOptions();
saveOption.setOutputType(OutputType.String);
String convertedDocumentPath = conversionHandler. convert("./intelligent systems.pdf", saveOption);
System.out.print("Converted file path is: " + convertedDocumentPath);

Configurations:
ConversionConfig conversionConfig = new ConversionConfig();
conversionConfig.setStoragePath(storagePath);
conversionConfig.setOutputPath(outputPath);
conversionConfig.setCachePath(cachePath);
// Generate cache
conversionConfig.setUseCache(true);
return conversionConfig;

We have some helpful resource for your ease:
We’d recommend you to explore these resources and share your valuable feedback.
Best regards