Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Last active September 7, 2019 16:11
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/b244e710652086026259ad615d70cec2 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/b244e710652086026259ad615d70cec2 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-.NET
string filePath = "../../SampleFiles/sample.pdf";
string fileName = Path.GetFileName(filePath);
string outputFilePath = Path.Combine("../../Output/", "SignWithQRCode", fileName);
using (Signature signature = new Signature(filePath))
{
// create QRCode option with predefined QRCode text
QrCodeSignOptions options = new QrCodeSignOptions("JohnSmith")
{
// setup QRCode encoding type
EncodeType = QrCodeTypes.QR,
// set signature position
Left = 100,
Top = 100
};
// sign document to file
signature.Sign(outputFilePath, options);
}
Console.WriteLine("\nSource document signed successfully.\nFile saved at " + outputFilePath);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment