nkpdfsign 0.1.1 copy "nkpdfsign: ^0.1.1" to clipboard
nkpdfsign: ^0.1.1 copied to clipboard

Pure Dart digital signing of existing PDF documents (PAdES-B-B, adbe.pkcs7.detached) with incremental updates. Server-side, no native dependencies.

example/nkpdfsign_example.dart

import 'dart:io';

import 'package:nkpdfsign/nkpdfsign.dart';

void main() {
  // Load the signing identity from a PKCS#12 (.p12/.pfx) file.
  final p12 = Pkcs12.load(
    File('test/fixtures/test_signer.p12').readAsBytesSync(),
    'test1234',
  );

  final signer = NkPdfSigner(SigningCredentials.fromPkcs12(p12));

  final signed = signer.sign(
    File('test/fixtures/libreoffice_classic.pdf').readAsBytesSync(),
    reason: 'Approval',
    location: 'Zagreb',
    signerName: 'NK Test Signer',
  );

  File('signed_sample.pdf').writeAsBytesSync(signed);
  print('wrote signed_sample.pdf (${signed.length} bytes)');
}
0
likes
160
points
6
downloads

Documentation

API reference

Publisher

verified publisherfraktal.hr

Weekly Downloads

Pure Dart digital signing of existing PDF documents (PAdES-B-B, adbe.pkcs7.detached) with incremental updates. Server-side, no native dependencies.

Repository (GitHub)
View/report issues

Topics

#pdf #digital-signature #pades #pkcs7 #cryptography

License

MIT (license)

Dependencies

pkcs12_parser, pointycastle

More

Packages that depend on nkpdfsign