Skip to main content
Participating Frequently
April 3, 2024
Question

PDF generation API error on recent DOCX

  • April 3, 2024
  • 4 replies
  • 7432 views

Hello, 
I use the PDF generation API to send docx template + array to retrieve pdf. All was working fine since end of March.
A working docx template will no longer work if i save it again (like add space + remove + save).
the problem occurs only when converting in pdf: template docx to docx seem working fine.

'cpf:inline' => [
                        'outputFormat'     => 'pdf',
                        'jsonDataForMerge' => ['toto' => 'toto'],
                    ],

outputFormat as PDF trigger the error.

here is the UNSUPPORTED_OR_CORRUPTED_TEMPLATE error : 

\"cpf:status\":{\"completed\":true,\"type\":\"\",\"title\":\"Either unsupported or corrupted file content provided. The only supported format is docx; transactionId=XpY0r4AgreDVkynOlMAPp60Qau7COeTL\",\"status\":400,\"report\":\"{\\\"error_code\\\":\\\"UNSUPPORTED_OR_CORRUPTED_TEMPLATE\\\",\\\"source\\\":\\\"docgen_engine\\\"}\"}

It seems there is may be a conflict with the Microsoft Word update and Adobe API service ?
You can reproduce event with an empty template

    4 replies

    bnroberts
    New Participant
    February 24, 2025

    I'm getting the same kind of problem. 

    New documents are generating ok, however some of my existing documents no longer generate. Even if I delete all content from the document it is still rejected as corrupted.

    I've attached a minimal document example.

    Unzipping the document the only thing thats obvious is that some 'media' has been retained even though it is not referenced in the content.


    New Participant
    May 14, 2024

    Any updates about this? I have the same issue with template docx & json file from the playground https://acrobatservices.adobe.com/dc-docgen-playground/index.html#/ . Here's my postman collection https://drive.google.com/file/d/1GWFzKj5-uzn2Ed4JlJY6oVS4dnIfyaGL/view?usp=sharing

    New Participant
    April 4, 2024

    I'm facing the same issue, except that I'm using the node sdk.

    Raymond Camden
    Community Manager
    Community Manager
    April 4, 2024

    @Yashwanth36533953k2p5 can you share your Word doc and code?

    CronaDevAuthor
    Participating Frequently
    January 7, 2025

    Hi @Raymond Camden, I think that the problem is the version of Word that is used to generate .docx template.

     

    If I donwload samples in Adobe playground (https://acrobatservices.adobe.com/dc-docgen-playground/index.html#/) and use it without any change they work well.

     

    But if I change anithing in Word template I receive the error :

    • "code": "CORRUPT_DOCUMENT",
    • "message": "The input file appears to be corrupted and cannot be processed.;

    Attached I put the original file, the changed and Json that you can use to view this.


    It seems that the problem reappears yes. If you need an empty docx to work on let met know

    Raymond Camden
    Community Manager
    Community Manager
    April 3, 2024

    Are you using the old REST API? If so - please switch to the new one and test there.

    CronaDevAuthor
    Participating Frequently
    April 3, 2024

    ok, thanks i will try for basic test, can you let me know when the "old" API will ne longer be usable ?

    Raymond Camden
    Community Manager
    Community Manager
    April 3, 2024

    I don't think we're taking it away, but we aren't providing any suupport for it.