Sign document with HIBC PAS barcode Symbology
Leave feedback
GroupDocs.SignatureΒ providesΒ HIBCPASDataΒ classΒ to create HIBC PAS barcode, designed specifically to meet the stringent requirements of the healthcare industry.
Here are the steps how to add HIBC PAS barcode signature into document with GroupDocs.Signature:
- Create new instance ofΒ SignatureΒ class and pass source document path as a constructor parameter.
- Instantiate theΒ Β HIBCPASData. Fill properties
- Instantiate theΒ Β QrCodeSignOptionsΒ object with all required additional options and set HIBCLICCombinedData object into Data property.
- CallΒ SignΒ method ofΒ SignatureΒ class instance and passΒ QrCodeSignOptionsΒ to it.
- AnalyzeΒ SignResultΒ result to check newly created signatures if needed.
This example shows how to add HIBCPASData signature to document using c#:
using (Signature signature = new Signature(filePath))
{
var data = new HIBCPASData()
{
DataLocation = HIBCPASDataLocation.Patient,
};
data.AddRecord(HIBCPASDataType.LabelerIdentificationCode, "A123");
data.AddRecord(HIBCPASDataType.ManufacturerSerialNumber, "SERIAL123");
// create options
QrCodeSignOptions options = new QrCodeSignOptions
{
EncodeType = QrCodeTypes.QR,
Left = 100,
Top = 100,
Data = data
};
// sign document to file
var signResult = signature.Sign(outputFilePath, options);
// analyzing result
Console.WriteLine("List of newly created signatures:");
int number = 1;
foreach (BaseSignature temp in signResult.Succeeded)
{
Console.WriteLine($"Signature #{number++}: Type: {temp.SignatureType} Id:{temp.SignatureId}, Location: {temp.Left}x{temp.Top}. Size: {temp.Width}x{temp.Height}");
}
Β }
This example shows how to decode HIBCPASData signature from the document using c#:
using (Signature.Signature signature = new Signature.Signature(outputFilePath))
{
List<QrCodeSignature> signatures = signature.Search<QrCodeSignature>(SignatureType.QrCode);
QrCodeSignature qrCode = signatures.FirstOrDefault();
var data = qrCode.GetData<HIBCPASData>();
}
You may easily run the code above and see the feature in action in ourΒ GitHub examples:
- GroupDocs.Signature for .NET examples, plugins, and showcase
- GroupDocs.Signature for Java examples, plugins, and showcase
- Document Signature for .NET MVC UI Example
- Document Signature for .NET App WebForms UI Example
- Document Signature for Java App Dropwizard UI Example
- Document Signature for Java Spring UI Example
Along with the full-featured .NET library, we provide simple but powerful free online apps.
To generate barcodes and/or sign your files with barcodes for free, you can use the Barcode Generator online app.
To sign PDF, Word, Excel, PowerPoint, and other documents you can use the other online apps from the GroupDocs.Signature App Product Family.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.