Last active
October 2, 2023 11:03
-
-
Save GroupDocsGists/4c70c60f1f5bdfce19da18f8b9f6ca11 to your computer and use it in GitHub Desktop.
Add QR Code to PDF, Excel, PPT, Word Documents, and Images in C#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change Appearance of QR code in C# | |
// Setting background color, forecolor, transparency, etc. | |
Background = new Background() | |
{ | |
Color = Color.Black, | |
Transparency = 0.5 | |
}, | |
//set text color and Font | |
ForeColor = Color.White |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment