Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active September 11, 2019 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/e6145d44a1fb759706ea3daea49a3c51 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/e6145d44a1fb759706ea3daea49a3c51 to your computer and use it in GitHub Desktop.
// For complete examples and data files, please go to https://github.com/groupdocs-signature/GroupDocs.Signature-for-Java
// setup Signature configuration
SignatureConfig signConfig = CommonUtilities.getConfiguration();
// instantiating the conversion handler
SignatureHandler<String> handler = new SignatureHandler<String>(signConfig);
PdfQRCodeSignOptions signOptions = new PdfQRCodeSignOptions("JohnSmith");
// setup QRCode encoding type
signOptions.setEncodeType(QrCodeTypes.QR);
// set signature position
signOptions.setLeft(100);
signOptions.setTop(100);
SaveOptions saveOptions = new SaveOptions();
saveOptions.setOutputType(OutputType.String);
saveOptions.setOutputFileName("SignWithQRCode");
// sign document
String signedPath = handler.<String>sign("sample.pdf", signOptions, saveOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment