Skip to main content
Participant
Jan 16, 2025 6:01 AM UTC
Answered

Convert Docx to pdf failed. error: The input file appears to be corrupted and cannot be processed.;

Dear team,

 Our code service of converting docx to pdf works well before and our IT team didn't update the code. But one day the function has some problem that there is an error showed below. I'm sure the docx file is ok and can be opened. Please help to have a look at the error and kindly to give me a feedback. Thanks a lot~

 

"errors": [
{
"message": "InternalServerErrorException: Failed to sign the document\nPath: C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\upload\\P25-00003_EL.docx.\nError: The input file appears to be corrupted and cannot be processed.; requestId=dd322948-c09b-464e-8ea1-0899b7fb4f6a",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"uploadEngagementLetterFile"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"stacktrace": [
"Error: InternalServerErrorException: Failed to sign the document",
"Path: C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\upload\\P25-00003_EL.docx.",
"Error: The input file appears to be corrupted and cannot be processed.; requestId=dd322948-c09b-464e-8ea1-0899b7fb4f6a",
" at C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\node_modules\\.pnpm\\@avista+nestjs-logger@2.1.5_@nestjs+common@9.4.3_reflect-metadata@0.1.14_rxjs@7.8.1__@nestjs+_axroniocw6hhtvsbk3h7nsa3va\\node_modules\\@avista\\nestjs-logger\\logger.interceptor.js:47:49",
" at Observable.init [as _subscribe] (C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\node_modules\\.pnpm\\rxjs@7.8.1\\node_modules\\rxjs\\src\\internal\\observable\\throwError.ts:123:68)",
" at Observable._trySubscribe (C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\node_modules\\.pnpm\\rxjs@7.8.1\\node_modules\\rxjs\\src\\internal\\Observable.ts:244:19)",
" at C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\node_modules\\.pnpm\\rxjs@7.8.1\\node_modules\\rxjs\\src\\internal\\Observable.ts:234:18",
" at Object.errorContext (C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\node_modules\\.pnpm\\rxjs@7.8.1\\node_modules\\rxjs\\src\\internal\\util\\errorContext.ts:29:5)",
" at Observable.subscribe (C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\node_modules\\.pnpm\\rxjs@7.8.1\\node_modules\\rxjs\\src\\internal\\Observable.ts:220:5)",
" at C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\node_modules\\.pnpm\\rxjs@7.8.1\\node_modules\\rxjs\\src\\internal\\operators\\catchError.ts:121:25",
" at OperatorSubscriber._this._error (C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\node_modules\\.pnpm\\rxjs@7.8.1\\node_modules\\rxjs\\src\\internal\\operators\\OperatorSubscriber.ts:79:13)",
" at OperatorSubscriber.Subscriber.error (C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\node_modules\\.pnpm\\rxjs@7.8.1\\node_modules\\rxjs\\src\\internal\\Subscriber.ts:91:12)",
" at OperatorSubscriber.Subscriber._error (C:\\Users\\maria.zhou\\Desktop\\Study\\Engagement-Letter\\backend\\node_modules\\.pnpm\\rxjs@7.8.1\\node_modules\\rxjs\\src\\internal\\Subscriber.ts:124:24)"
]
}
}
],

    Joel Geraci
    Joel GeraciCorrect answer
    Community Expert
    Jan 17, 2025 3:08 PM UTC

    Thank you for your reply. Yes, I think it is indeed caused by the update of Word. Waiting for your updation. Furthermore, if there is any other solution about it, could you please kindly let me know? Maybe update the SDK version or something else. Thank you~

     

    Best Regards.


    Please test again. Engineering tells me that they have released a patch update to Document Generation. Can you conform it's fixed?

    6 replies

    Participant
    Jan 16, 2025 9:59 AM UTC

    Sorry for the wrong discription. The service actually is merge mutiple files to one pdf. I upload a signature that has been convert to a json file and a simple docx file, I want to merge them into one pdf but has an error "The input file appears to be corrupted and cannot be processed.". I'm sure that the docx file can be opened and not be destroyed. The requestId is 4ba88f69-cb83-4efa-962a-ad1e600dcba4. Could you kindly help me to solve it. Thanks a lot~

    Translate
    Joel Geraci
    Community Expert
    Community Expert
    Jan 16, 2025 4:10 PM UTC

    Are you referring to the Document Generation API? If so, we are investigating the issue. It seems to be related to a Word update.

    Translate
    Participant
    Jan 17, 2025 9:44 AM UTC

    Thank you for your reply. Yes, I think it is indeed caused by the update of Word. Waiting for your updation. Furthermore, if there is any other solution about it, could you please kindly let me know? Maybe update the SDK version or something else. Thank you~

     

    Best Regards.

    Translate