PDF from single DOCX(with fonts) smartservice

Certified Associate Developer

even if delete the font configuration in this smart service its taking the font from its previous version.  new document is not updating as per the current font configuration . what is the issue? can anyone help me in this pls

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I'm not sure what plug-in the smart service you're using is found in, but in at least one other PDF utility I'm used to working with, the smart service does not properly pull the latest version of a versioned document (like a template that you've updated with subsequent versions).

    Our workaround to this is to always pass the template doc ID through an expression rule we've set up that gets the latest ID for the template (since, behind the scenes, separate IDs are really generated for each version, but only one is easily seen from the UI).

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

    Note that the above code assumes that you won't have any duplicated document names within the folder containing your template.  Of course I'd always recommend against that anyway.

  • Hi Mike,

    I am still facing the same issue with "PDF from single DOCX(with fonts)" smartservice, I am passing "Arial" font documents stored in a constant and passing that as reference, but the generated pdf always has "Times New Roman", can you please let me know???

Reply Children
No Data