Hello dear podofo users,

I want to sign an already encrypted pdf using podofo, but I don't get it to
work:

1.) My existing solution for signing a pdf document utilizes loading the
pdf in update mode with subsequent WriteUpdate. This does not work, when
I'm trying to load the encrypted pdf document, I get
'ePdfError_CannotEncryptedForUpdate' as error.

2.) Ok, so I changed my signing implementation to not use normal Write(),
so I don't have to use update mode for loading. When I'm now loading the
encrypted pdf document, it works and I'm able to place my signature. BUT,
when I'm opening the file in a pdf viewer, it doesn't ask me for any
password! I can see that my configured permissions are still there, so this
part of the security settings is still there, but the password (user/owner)
got lost.

3.) Ok, so I thought, maybe I've got to set the security options again
after loading the pdf. Did that, but when performing the write operation
for signing, I got a cryptic runtime error (read access violation):

The error is thrown in 'base\PdfParserObj.cpp', Line 346:
PdfInputStream* pInput = m_pEncrypt->CreateEncryptionInputStream( &reader );

The error states: "this->m_pEncrypt-> was 0xFFFFFFFFFFFFFFDF"

I don't quite understand, how this can even happen. In the line above, the
->Operator is used on
m_pEncrypt as well, and there's no problem with it. I can't step into the
function, the error comes right away. But m_pEncrypt is still valid, says
the debugger.

Maybe I just can't set security options again?


And now I'm out of ideas. Does anyone have a hint for me?

Best regards,
F.E.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to