We're sorry GroupDocsCloud doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.cloud

Downloaded pdf file and converted file is not openinig

image.png (24.6 KB)


I am unable to notice while converting PDF to DOCX as following. Please share your sample code, we will look into the issue and guide you accordingly.

// load the module
var GroupDocs = require('groupdocs-conversion-cloud');
var fs = require('fs');

// get your ClientId and ClientSecret at https://dashboard.groupdocs.cloud (free registration is required).
var clientID = "xxxxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxx";
var clientSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx";

// construct Api
const api = GroupDocs.ConvertApi.fromKeys(clientID, clientSecret);
const file = fs.readFileSync('C:/Temp/02_pages.pdf');
const localPath = "C:/Temp/dummy_textstamp.docx";

const request = new GroupDocs.ConvertDocumentDirectRequest("docx",file,undefined,undefined);
                .then((result) => {    
fs.writeFileSync(localPath, result);
}).catch(function(err) {
    // Deal with an error

while downloading the file from dashboard the above error occur on opening file @tilal.ahmad


As requested above, please share your sample code for investigation.

as i said earlier i am not downloading file with code but directly from dashboard section files.
image.png (19.8 KB)


We are sorry for the confusion. It seems the output file stored in the cloud storage is not correct, so we are asking for the code used for the conversion. Or if you have some other different workflow, then please share the details.

var resourcesFolder = path.join(__dirname, `../${req.file.path}`);
    console.log(resourcesFolder, req.file);
    fs.readFile(resourcesFolder, (err, fileStream) => {
      if (err) {
      } else {
        // construct FileApi
        var fileApi = groupdocs_conversion_cloud.FileApi.fromConfig(
        // create upload file request
        var request = new groupdocs_conversion_cloud.UploadFileRequest(
        // upload file
          file_name: req.file.filename,
          original_name: req.file.originalname,
          message: "Uploaded Successfully!",

code for uploading

let convertApi = groupdocs_conversion_cloud.ConvertApi.fromKeys(

// define convert settings
let settings = new groupdocs_conversion_cloud.ConvertSettings();
settings.filePath = req.body.file_name; // input file path on the cloud
settings.format = "docx"; // output format
settings.outputPath = "output"; // output file folder on the cloud

// create convert document request
let request = new groupdocs_conversion_cloud.ConvertDocumentRequest(

// convert document
let result = await convertApi.convertDocument(request);
console.log("Document converted successfully: " + result[0].url);

code for conversion


Thanks for sharing the details. So you are uploading a file(PDF) to cloud storage and then converting it to a DOCX file. I am unable to test your file uploading code due to missing references. After uploading your file to cloud storage, please download it using the dashboard and double check whether it is a valid document.