XFRX doesn't close the output PDF file if certificate password is not valid.
KB-20220312-01
Version
before XFRX 22.0
Symptoms
If password for certificate not is valid, then XFRX doesn't close the pdf file.
Workaround
Call the Finish() method of the internal object oDocumentwriter:
loSession=EVALUATE([xfrx("XFRX#LISTENER")])
loSession.DigitalSignature("testeqeus.pfx","badpassword")
lnRetVal = loSession.SetParams("output.pdf", , , ,.F.,,"PDF")
IF lnRetVal<>0
IF INLIST(lnRetVal, -11, -12)
loSession.oxfSession.oDocumentwriter.oPDF.Finish()
ENDIF
ENDIF
loSession=EVALUATE([xfrx("XFRX#INIT")])
loSession.DigitalSignature("testeqeus.pfx","badpassword")
lnRetVal = loSession.SetParams("output.pdf", , , ,.F.,,"PDF")
IF lnRetVal<>0
IF INLIST(lnRetVal, -11, -12)
loSession.oDocumentwriter.oPDF.Finish()
ENDIF
ENDIF
, multiple selections available,