I already looked at all the thread. Not sure why my code is not working. I tried all scenarios recommended by the references and the posts in this forum. As soon as I wrap the function with the trustedFunction, the function is no longer working.
Is your PDF certified? and do you trust the certificate?