Dynamic Document Generator, DOCX to PDF, PDF not updating with DOCX

Certified Associate Developer

We are using the Dynamic Document Generator plug-in to convert a DOCX file created from a template to a PDF. The word document creation works perfectly, however the PDF seems to be static and does not update based on the new values in the word document. Both the word document and the PDF are set up to overwrite the existing files each time.

Does anyone have any ideas on what could be causing this and how we could fix it?

Thanks.

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    I'm not completely sure, but I suspect this might have to do with the fact that some smart services seem to (inadvertently, I assume) ignore new versions of a file, instead only looking at the originally published version.  To combat this I have an expression rule in my system which takes a document ID (corresponding to the original doc ID and the one you'd see when checking from the front-end) and returns actual back-end ID of the most recent version.

    todocument(
      tointeger(
        index(
          findcontentbyattribute(
            searchAllContent: false(),
            contentType: "document",
            attributeName: "name",
            searchCriteria: document(ri!document, "name"),
            rootFolder: rule!RULE_replaceNull(
              ri!rootFolder,
              document(ri!document, "folderId")
            )
          ),
          1,
          null()
        )
      )
    )

Reply
  • +1
    Certified Lead Developer

    I'm not completely sure, but I suspect this might have to do with the fact that some smart services seem to (inadvertently, I assume) ignore new versions of a file, instead only looking at the originally published version.  To combat this I have an expression rule in my system which takes a document ID (corresponding to the original doc ID and the one you'd see when checking from the front-end) and returns actual back-end ID of the most recent version.

    todocument(
      tointeger(
        index(
          findcontentbyattribute(
            searchAllContent: false(),
            contentType: "document",
            attributeName: "name",
            searchCriteria: document(ri!document, "name"),
            rootFolder: rule!RULE_replaceNull(
              ri!rootFolder,
              document(ri!document, "folderId")
            )
          ),
          1,
          null()
        )
      )
    )

Children