I am using group docs parser api to parse documents. EPUBs are parsing fine but PDFs are parsing incompletely.
I have my software in production and i am losing users because of this.
Below is the code i am using.
Upload is working fine and epubs and docx are also working fine but PDFs are incompletley parsed
Future<String?> getParsedText(File? file, String? fileName) async {
var accessToken = await generateJwt();
var filePath = await uploadDocumentToCloud(file, fileName, accessToken);
var url = Uri.parse('https://api.groupdocs.cloud/v1.0/parser/text');
var body = jsonEncode({
"FileInfo": {
"FilePath": filePath,
}
});
var headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-aspose-client': 'Containerize.Swagger',
'Authorization': 'Bearer $accessToken',
};
var response = await http.post(url, body: body, headers: headers);
if (response.statusCode == 200) {
var text = jsonDecode(response.body)["text"];
return text;
}
return null;
}