Created attachment 13281 [details] code pdf,cert password(testtest) signature byterange error <</ByteRange[2147483647 2147483647 2147483647 2147483647]/Contents<00000000000000000000000000000000000000000000000000000000000000000.... can't complete the signature
1.9a is worked an the same code
the reason is in function pdf_save_document() too early finalise PDF_Write_state, and too late write the file tail。 change the code in pdf_save_document() can resolve the problem. fz_try(ctx) { initialise_write_state(ctx, doc, in_opts, &opts); do_pdf_save_document(ctx, doc, &opts, in_opts); fz_drop_output(ctx, opts.out); opts.out = NULL; complete_signatures(ctx, doc, &opts, filename); } fz_always(ctx) { finalise_write_state(ctx, &opts); } fz_catch(ctx)