| <<<Back 1 day (to 2017/03/07) | 20170308 |
volodymyrkhmil | Hi! Can someone help with MuPDF documents signing functionality? I found source code with PDF signing. Still "pdf_signature_set_value" filling empty "PDF_NAME_Contents" and "PDF_NAME_ByteRange". I should fill them before saving document, but can't get how should I form them from PDF document. I would really appreciate if someone helps me... | 12:16.48 |
tor8 | volodymyrkhmil: are you trying to create a new signature annotation to sign the document? | 12:25.51 |
volodymyrkhmil | Yes, by using x509 selfsigned certificate. | 12:26.35 |
| right now I'm trying without visual representation(widget has there rect), but next step I suppose adding as well some visual sign. | 12:27.36 |
tor8 | unfortunately I think our signing code only got as far as signing using an existing annotation | 12:27.42 |
| so you'll need to create a new signature annotation first, and then you can sign that | 12:28.40 |
| or you should be able to... the developer responsible for the digital signatures is working on a different project now | 12:29.21 |
| so I can't make any promises that things will work (though they should) | 12:29.56 |
| when saving the PDF the ByteRanges and Contents fields should be automatically filled in | 12:33.22 |
volodymyrkhmil | I'm creating new signature annotation, but during signing there is such comment inside sources "/* Record details within the document structure so that contents * and byte_range can be updated with their correct values at * saving time */". Problem is that I can't find how should I form content and byterange to put them inside dictionary before saving the document. It would be good if you just point me into so | 12:33.36 |
tor8 | calling pdf_sign_document creates blank entries that get filled in when saving the document | 12:33.50 |
| the "complete_signatures" function does that for you, when you call pdf_save_document | 12:34.22 |
volodymyrkhmil | @tor8 still after pdf saving and when I'm checking if signature is valid, this function returns false. I've debugged it, and found that reason of it is because Content is empty. Let me check one more time if I've not missed anything. Your's appointments may really help me. Thanks a lot. | 12:36.37 |
tor8 | volodymyrkhmil: can you test creating the signature annotation, and see if signing it with the android mupdf app works? | 12:44.01 |
| the android app is the only code we have that is hooked up to signing documents | 12:44.32 |
volodymyrkhmil | Ok, I will check it. Is it's source code available? | 12:45.30 |
tor8 | yes. here http://git.ghostscript.com/?p=mupdf-android-viewer-old.git;a=summary | 12:47.44 |
| Forward 1 day (to 2017/03/09)>>> | |