Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add QR Code to PDF, Excel, PPT, Word Documents, and Images using .NET and Java API
// Electronically Sign PDF, Excel, PPT, Word Documents and Images with QR Code using GroupDocs.Signature for .NET API
using (Signature signature = new Signature("filePath/document.pdf")) // Provide any DOC, PDF, XLS, PPT, PNG, JPG, WebP file.
{
// Create QR Code option with predefined text
QrCodeSignOptions options = new QrCodeSignOptions("Signed by GroupDocs")
{
EncodeType = QrCodeTypes.QR,
// Set QR Code position & appearance
Left = 50,
Top = 50,
Width = 90,
Height = 90
};
// Sign document and save file
SignResult result = signature.Sign("filePath/document-with-qr-code.pdf", options);
}
// Electronically Sign PDF, Excel, PPT, Word Documents and Images with QR Code using GroupDocs.Signature for Java API
Signature signature = new Signature("filePath/document.pdf"); // Provide any DOC, PDF, XLS, PPT, PNG, JPG, WebP file.
// Create QR Code option with predefined text
QrCodeSignOptions options = new QrCodeSignOptions("Signed by GroupDocs");
options.setEncodeType(QrCodeTypes.QR);
options.setAllPages(true);
// Set QR Code position & appearance
options.setLeft(50);
options.setTop(50);
options.setHeight(90);
options.setWidth(90);
// Sign document and save file
signature.sign("filePath/document-with-qr-code.pdf", options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.