GroupDocs.Signature for Node.js via Java 24.3 Release Notes
The release of GroupDocs.Signature version 24.3 adds new feature and enhancement.
Full list of changes in this release
Key | Category | Summary |
---|---|---|
SIGNATURENET-3882 | ★ Feature | Implement MailMark as new QR type Embedded Object |
SIGNATURENET-4657 | ★ Feature | Implement new Barcode Type GS1DotCode |
SIGNATURENET-4650 | Enhancement | Enhanse Archive operations with supporting verify command |
SIGNATURENET-4671 | Enhancement | Update deprecated System.Drawing.Common to version 6 |
SIGNATURENET-4685 | Enhancement | Remove duplicated GetSignPages implementation |
SIGNATURENET-4744 | ★ Feature | Adding HIBC LIC QR code support |
SIGNATURENET-4743 | ★ Feature | Implement new QR-code Type HanXin |
SIGNATURENET-4750 | Enhancement | Support pagination for ImageLayers format in the search process |
SIGNATURENET-4679 | Enhancement | Improve experience with multi pages TIFF document |
SIGNATURENET-4757 | Enhancement | Extend document preview generation data |
SIGNATURENET-4751 | Enhancement | Remove duplicates of GetSearchPages implementation in the SearchOptions classes |
SIGNATURENET-4726 | 🔧 Fix | Fixing image acquisition in the Linux environment |
SIGNATURENET-4786 | ★ Feature | Implement ability to sign the xlsm with VBA files |
SIGNATURENET-4809 | Enhancement | PDF digital signing with external digital signatures |
SIGNATURENET-4853 | Enhancement | Supporting Swiss QR Code symbology |
SIGNATURENET-4818 | Enhancement | Improve experience with multi pages Webp document |
SIGNATURENET-4784 | Enhancement | Support signing with HIBC LIC primary and secondary data structure |
SIGNATURENET-4680 | 🔧 Fix | Signing pdf with digital signature puts evaluation watermark on output doc |
SIGNATURENET-4736 | Enhancement | Enhance Archive operations with supporting preview command |
SIGNATURENET-4357 | Enhancement | Supporting HIBC PAS QR symbology |
SIGNATURENET-4977 | ★ Feature | Add ability to create text signature in the word headers and footers |
SIGNATURENET-4948 | Enhancement | Implement new QR-code Type GS1HanXin |
SIGNATURENET-4824 | 🔧 Fix | Unreadable evaluation message for PDF signed digitally without license |
SIGNATURENET-4982 | ★ Feature | Added functionality to insert image signatures into the header or footer of Word processing documents. |
SIGNATURENET-4988 | ★ Feature | Added functionality to insert Barcode/QrCode signatures into the header or footer of Word processing documents. |
SIGNATURENET-4990 | ★ Feature | Added functionality to insert Stamp signatures into the header or footer of Word processing documents. |
Major Features
This release includes two new barcode format features and one archive enhancement:
- Implement MailMark as new QR type Embedded Object
- Implement new Barcode Type GS1DotCode
- Enhanse Archive operations with supporting verify command
- Adding HIBC LIC QR code support
- Implement new QR-code Type HanXin
- Improve experience with multi pages TIFF document
- Extend document preview generation data
Implement MailMark as new QR type Embedded Object
🌐 New class Mailmark2D has been added to support the Royal Mail Mailmark 2D barcode standard.
Signature signature = new Signature(filePath);
// create Mailmark2D data object
Mailmark2D mailmark2D = new Mailmark2D();
mailmark2D.setUPUCountryID("JGB ");
mailmark2D.setInformationTypeID("0");
mailmark2D.setClass("1");
mailmark2D.setSupplyChainID(123);
mailmark2D.setItemID(1234);
mailmark2D.setDestinationPostCodeAndDPS("QWE1");
mailmark2D.setRTSFlag("0");
mailmark2D.setReturnToSenderPostCode("QWE2");
mailmark2D.setDataMatrixType(Mailmark2DType.Type_7);
mailmark2D.setCustomerContentEncodeMode(DataMatrixEncodeMode.C40);
mailmark2D.setCustomerContent("CUSTOM");
// create options
QrCodeSignOptions options = new QrCodeSignOptions();
options.setEncodeType(QrCodeTypes.QR);
options.setLeft(100);
options.setTop(100);
// setup Data property to Mailmark2D instance
options.setData(mailmark2D);
// sign document to file
signature.sign(outputFilePath, options);
Implement new Barcode Type GS1DotCode
🌐 New property GS1DotCode was added in the BarcodeTypes class. GS1 DotCode is a two-dimensional (2D) matrix symbology that can carry all GS1 keys and attributes. It can be applied to hold trade item information such as the item expiry date, serial number or batch/lot number.
const fs = require('fs');
const path = require('path');
async function signDocumentWithGS1DotCode(groupdocs, sourceFilePath, destinFilePath) {
// create GS1DotCode Barcode options
const GS1DotCodeOptions = new groupdocs.signature.options.sign.BarcodeSignOptions("(01)04912345123459(15)970331(30)128(10)ABC123", groupdocs.signature.options.sign.BarcodeTypes.GS1DotCode);
GS1DotCodeOptions.left = 1;
GS1DotCodeOptions.top = 1;
GS1DotCodeOptions.height = 150;
GS1DotCodeOptions.width = 200;
GS1DotCodeOptions.returnContent = true;
GS1DotCodeOptions.returnContentType = groupdocs.signature.FileType.PNG;
// compose list of options
const listOptions = [GS1DotCodeOptions];
// sign document to file with list of all specific QR-Codes
const signResult = await groupdocs.signature.Sign(sourceFilePath, destinFilePath, listOptions);
console.log(`\nSource document signed successfully.\nFile saved at ${destinFilePath}`);
}
module.exports = signDocumentWithGS1DotCode;
Enhanse Archive operations with supporting verify command
🌐 In this release, we added ability to verify signatures in the archive documents.
const fs = require('fs');
const path = require('path');
async function verifyDocumentWithBarcodesAndQrCodes(groupdocs, filePath) {
const signature = new groupdocs.signature.Signature(filePath);
// create list of verification options
const barOptions = new groupdocs.signature.options.verify.BarcodeVerifyOptions();
barOptions.text = "12345";
barOptions.matchType = groupdocs.signature.options.verify.TextMatchType.Contains;
const qrOptions = new groupdocs.signature.options.verify.QrCodeVerifyOptions();
qrOptions.text = "12345";
qrOptions.matchType = groupdocs.signature.options.verify.TextMatchType.Contains;
const listOptions = [barOptions, qrOptions];
// Verify documents at the archive
const result = await signature.verify(listOptions);
// check the result
if (result.isValid) {
console.log("\nDocument was verified successfully!");
console.log("\nList of Succeeded signatures:");
result.succeeded.forEach(temp => {
console.log(` - ${temp.signatureId} - ${temp.signatureType} at: ${temp.left}x${temp.top}. Size: ${temp.width}x${temp.height}`);
});
} else {
console.log("\nDocument failed verification process.");
}
}
module.exports = verifyDocumentWithBarcodesAndQrCodes;
Adding HIBC LIC QR code support
🌐 New class HIBCLICCombinedData has been added to support the HIBC LIC barcode Symbology. It is used by manufacturers of health care products for identification purpose. Labelers can encode Primary Data and Secondary Data.
const fs = require('fs');
const path = require('path');
async function signAndSearchQrCode(groupdocs, filePath, outputFilePath) {
// Sign document with QR code
const signature = new groupdocs.signature.Signature(filePath);
const hibclicCombinedData = new groupdocs.signature.options.sign.HIBCLICCombinedData();
{
const primaryData = new groupdocs.signature.options.sign.HIBCLICPrimaryData();
primaryData.productOrCatalogNumber = "12345";
primaryData.labelerIdentificationCode = "A999";
primaryData.unitOfMeasureID = 1;
const secondaryAdditionalData = new groupdocs.signature.options.sign.HIBCLICSecondaryAdditionalData();
secondaryAdditionalData.expiryDate = new Date();
secondaryAdditionalData.expiryDateFormat = groupdocs.signature.options.sign.HIBCLICDateFormat.MMDDYY;
secondaryAdditionalData.quantity = 30;
secondaryAdditionalData.lotNumber = "LOT123";
secondaryAdditionalData.serialNumber = "SERIAL123";
secondaryAdditionalData.dateOfManufacture = new Date();
hibclicCombinedData.primaryData = primaryData;
}
const options = new groupdocs.signature.options.sign.QrCodeSignOptions();
options.encodeType = groupdocs.signature.options.sign.QrCodeTypes.QR;
options.left = 100;
options.top = 100;
options.data = hibclicCombinedData;
await signature.sign(outputFilePath, options);
// Search QR code and get decoded typed data back
const searchSignature = new groupdocs.signature.Signature(outputFilePath);
const signatures = await searchSignature.search(groupdocs.signature.options.sign.QrCodeSignature, groupdocs.signature.SignatureType.QrCode);
const qrCode = signatures[0];
const decodedData = qrCode.getData(groupdocs.signature.options.sign.HIBCLICCombinedData);
console.log("QR code searched and decoded successfully:");
console.log(decodedData);
}
module.exports = signAndSearchQrCode;
Implement new QR-code Type HanXin
🌐 New property HanXin was added in the QRCodeTypes class. Han Xin Code is a two-dimensional matrix symbology that allows to encode Simplified Chinese characters.
const fs = require('fs');
const path = require('path');
async function signDocumentWithHanXinCode(groupdocs, sourceFilePath, destinFilePath) {
const signature = new groupdocs.signature.Signature(sourceFilePath);
const hanXinCodeOptions = new groupdocs.signature.options.sign.QrCodeSignOptions("(01)04912345123459(15)970331(30)128(10)ABC123", groupdocs.signature.options.sign.QrCodeTypes.HanXin);
hanXinCodeOptions.left = 201;
hanXinCodeOptions.top = 1;
hanXinCodeOptions.height = 200;
hanXinCodeOptions.width = 200;
hanXinCodeOptions.returnContent = true;
hanXinCodeOptions.returnContentType = groupdocs.signature.FileType.PNG;
// compose list of options
const listOptions = [hanXinCodeOptions];
// sign document to file with list of all specific QR-Codes
const signResult = await signature.sign(destinFilePath, listOptions);
console.log(`\nSource document signed successfully.\nFile saved at ${destinFilePath}`);
}
module.exports = signDocumentWithHanXinCode;
Improve experience with multi pages TIFF document
🌐 In this release, we added the ability to work with TIFF/TIF documents as with multi pages document. It’s possible to configure PagesSetup property with list of the specific pages.
const fs = require('fs');
const path = require('path');
async function signMultipageDocument(groupdocs, filePath, outputFilePath) {
const signature = new groupdocs.signature.Signature(filePath);
const options = new groupdocs.signature.options.sign.QrCodeSignOptions("Patient #36363393. R: No-Issues");
options.left = 10;
options.top = 10;
options.width = 200;
options.height = 200;
const pageSetup = new groupdocs.signature.options.sign.PagesSetup();
pageSetup.pageNumbers = [1, 3];
options.pagesSetup = pageSetup;
// sign document to file
const signResult = await signature.sign(outputFilePath, options);
console.log(`\nDocument signed with ${signResult.succeeded.length} signatures`);
console.log("List of newly created signatures:");
signResult.succeeded.forEach(temp => {
console.log(`${temp.signatureType} at page #${temp.pageNumber}: Id:${temp.signatureId}.`);
});
}
module.exports = signMultipageDocument;
Implement ability to sign the xlsm with VBA files
🌐 In response to your feedback, we’ve implemented the ability to sign xlsm files containing VBA macros. Now, you can seamlessly sign your xlsm documents with VBA files for added security and compliance. New class DigitalVBA has been added to support signing VBA macroses.
const fs = require('fs');
const path = require('path');
async function signExcelDocumentWithDigitalVBA(groupdocs, excelFilePath, certificatePath, password, outputFilePath) {
const signature = new groupdocs.signature.Signature(excelFilePath);
const signOptions = new groupdocs.signature.options.sign.DigitalSignOptions();
// Add extension for signing VBA project digitally
const digitalVBA = new groupdocs.signature.options.sign.DigitalVBA(certificatePath, password);
digitalVBA.signOnlyVBAProject = true;
digitalVBA.comments = "VBA Comment";
signOptions.extensions.push(digitalVBA);
// sign document to file
await signature.sign(outputFilePath, signOptions);
console.log(`\nDocument signed with Digital VBA extension. File saved at ${outputFilePath}`);
}
module.exports = signExcelDocumentWithDigitalVBA;
PDF digital signing with external digital signatures
We understand the importance of digital signatures in PDF documents. In this release, we’ve introduced support for signing PDFs with external digital signatures, making it easier to verify the authenticity and integrity of your PDF files. It supports usb smartcards, tokens without exportable private keys.
Supporting Swiss QR Code symbology
🌐 To meet the specific needs of our Swiss users, we’ve added support for the Swiss QR Code symbology. Now you can generate and process Swiss QR Codes with ease, ensuring compatibility with the latest standards. New class SwissQR has been added, which allows to configure QR properties.
const fs = require('fs');
const path = require('path');
async function signAndSearchSwissQR(groupdocs, filePath, outputFilePath) {
// Sign document with Swiss QR code
const signature = new groupdocs.signature.Signature(filePath);
const data = new groupdocs.signature.options.sign.SwissQR();
data.account = "CH4431999123000889012";
data.amount = 1000.25;
data.currency = "CHF";
data.reference = "210000000003139471430009017";
const creditor = new groupdocs.signature.options.sign.SwissAddress();
creditor.name = "Muster & Söhne";
creditor.street = "Musterstrasse";
creditor.houseNo = "12b";
creditor.postalCode = "8200";
creditor.town = "Zürich";
creditor.countryCode = "CH";
const debtor = new groupdocs.signature.options.sign.SwissAddress();
debtor.name = "Muster AG";
debtor.street = "Musterstrasse";
debtor.houseNo = "1";
debtor.postalCode = "3030";
debtor.town = "Bern";
debtor.countryCode = "CH";
data.creditor = creditor;
data.debtor = debtor;
// create options
const options = new groupdocs.signature.options.sign.QrCodeSignOptions();
options.encodeType = groupdocs.signature.options.sign.QrCodeTypes.QR;
options.left = 100;
options.top = 100;
options.data = data;
// sign document to file
await signature.sign(outputFilePath, options);
console.log(`\nDocument signed with Swiss QR code. File saved at ${outputFilePath}`);
// Search QR code and get decoded typed data back
const searchSignature = new groupdocs.signature.Signature(outputFilePath);
const signatures = await searchSignature.search(groupdocs.signature.options.sign.QrCodeSignature, groupdocs.signature.SignatureType.QrCode);
const qrCode = signatures[0];
const swissData = qrCode.getData(groupdocs.signature.options.sign.SwissQR);
console.log("\nSwiss QR code searched and decoded successfully:");
console.log(swissData);
}
module.exports = signAndSearchSwissQR;
Improve experience with multi pages Webp document
🌐 Your experience with multi-page WebP documents has been significantly enhanced. From now it’s possible to sign specific pages in the WebP document.
const fs = require('fs');
const path = require('path');
async function signMultipageDocument(groupdocs, filePath, outputFilePath) {
const signature = new groupdocs.signature.Signature(filePath);
const options = new groupdocs.signature.options.sign.QrCodeSignOptions("Patient #363633103. R: No-Issues");
options.left = 10;
options.top = 10;
options.width = 200;
options.height = 200;
const pagesSetup = new groupdocs.signature.options.sign.PagesSetup();
pagesSetup.pageNumbers = [1, 3];
options.pagesSetup = pagesSetup;
// sign document to file
const signResult = await signature.sign(outputFilePath, options);
console.log(`\nDocument signed with ${signResult.succeeded.length} signatures`);
console.log("List of newly created signatures:");
signResult.succeeded.forEach(temp => {
console.log(`${temp.signatureType} at page #${temp.pageNumber}: Id:${temp.signatureId}.`);
});
}
module.exports = signMultipageDocument;
Support signing with HIBC LIC primary and secondary data structure
🌐 Ability to sign with HIBC LIC barcode Symbology using primary and secondary data separately
const fs = require('fs');
const path = require('path');
async function signAndSearchHIBCLICData(groupdocs, filePath, outputFilePath) {
// Sign document with HIBCLIC Secondary data
const signature = new groupdocs.signature.Signature(filePath);
const data = new groupdocs.signature.options.sign.HIBCLICSecondaryAdditionalData();
data.expiryDate = new Date();
data.expiryDateFormat = groupdocs.signature.options.sign.HIBCLICDateFormat.MMDDYY;
data.quantity = 30;
data.lotNumber = "LOT123";
data.serialNumber = "SERIAL123";
data.dateOfManufacture = new Date();
// create options
const options = new groupdocs.signature.options.sign.QrCodeSignOptions();
options.encodeType = groupdocs.signature.options.sign.QrCodeTypes.QR;
options.left = 100;
options.top = 100;
options.data = data;
// sign document to file
await signature.sign(outputFilePath, options);
console.log(`\nDocument signed with HIBCLIC Secondary data. File saved at ${outputFilePath}`);
// Search QR code and get decoded typed data back
const searchSignature = new groupdocs.signature.Signature(outputFilePath);
const signatures = await searchSignature.search(groupdocs.signature.options.sign.QrCodeSignature, groupdocs.signature.SignatureType.QrCode);
const qrCode = signatures[0];
const retrievedData = qrCode.getData(groupdocs.signature.options.sign.HIBCLICSecondaryAdditionalData);
console.log("\nHIBCLIC Secondary data retrieved successfully:");
console.log(retrievedData);
}
module.exports = signAndSearchHIBCLICData;
Signing pdf with digital signature puts evaluation watermark on output doc
🌐 We’ve addressed a bug where signing PDF documents with digital signatures would inadvertently result in an evaluation watermark appearing on the output document. This issue has been resolved, ensuring that your signed documents remain professional and watermark-free.
Enhance Archive operations with supporting preview command
🌐 We’ve added a new PageDataStreamFactory interface to allow you to preview pages of documents or archives. The createPageDataStream method of this interface supports the new PreviewPageData type. This class contains not only pageNumber, but also filename and image preview format. This cutting-edge feature is designed to provide users with a seamless and insightful preview experience while interacting with archived documents.
const fs = require('fs');
const path = require('path');
async function generatePreview(groupdocs, filePath) {
// Initialize Signature instance
const signature = new groupdocs.signature.Signature(filePath);
// Define PreviewOptions
const options = new groupdocs.signature.options.preview.PreviewOptions();
// Define PageDataStreamFactory implementation
options.pageDataStreamFactory = new groupdocs.signature.options.preview.PageDataStreamFactory({
createPageDataStream: function(pageData) {
return pageStreamArchive(pageData);
},
closePageDataStream: function(pageData, pageStream) {
releaseStreamArchive(pageData, pageStream);
}
});
// Set preview format
options.previewFormat = groupdocs.signature.options.preview.PreviewFormats.JPEG;
// Generate preview
await signature.generatePreview(options);
console.log(`Preview generation completed for ${filePath}`);
}
function pageStreamArchive(pageData) {
try {
const outputFilePath = getOutputFilePath(`New_${path.basename(filePath)}/${pageData.fileName}_p${pageData.pageNumber}.${pageData.previewFormat.toExtension()}`, OutputFolder);
return fs.createWriteStream(outputFilePath);
} catch (error) {
throw new Error(`Failed to create page stream: ${error.message}`);
}
}
function releaseStreamArchive(pageData, pageStream) {
try {
pageStream.end();
} catch (error) {
throw new Error(`Failed to release page stream: ${error.message}`);
}
}
// Helper function to construct output file path
function getOutputFilePath(fileName, outputFolder) {
return path.join(outputFolder, fileName);
}
module.exports = generatePreview;
Supporting HIBC PAS QR symbology
🌐 Elevate healthcare processes with HIBC PAS QR symbology support, designed specifically to meet the stringent requirements of the healthcare industry. Ensure precision and accuracy in encoding and decoding critical data related to prescriptions and healthcare information. New class HIBCPASData has been added, which allows to configure QR properties.
const fs = require('fs');
const path = require('path');
async function signAndSearchHIBCPASData(groupdocs, filePath, outputFilePath) {
// Sign document with HIBCPASData
const signature = new groupdocs.signature.Signature(filePath);
// Create HIBCPASData instance
const data = new groupdocs.signature.options.sign.HIBCPASData();
data.dataLocation = groupdocs.signature.options.sign.HIBCPASDataLocation.Patient;
data.addRecord(groupdocs.signature.options.sign.HIBCPASDataType.LabelerIdentificationCode, "A123");
data.addRecord(groupdocs.signature.options.sign.HIBCPASDataType.ManufacturerSerialNumber, "SERIAL123");
// create options
const options = new groupdocs.signature.options.sign.QrCodeSignOptions();
options.encodeType = groupdocs.signature.options.sign.QrCodeTypes.QR;
options.left = 110;
options.top = 110;
options.data = data;
// sign document to file
await signature.sign(outputFilePath, options);
console.log(`Document signed with HIBCPASData. File saved at ${outputFilePath}`);
// Search QR code and get decoded typed data back
const searchSignature = new groupdocs.signature.Signature(outputFilePath);
const signatures = await searchSignature.search(groupdocs.signature.options.sign.QrCodeSignature, groupdocs.signature.SignatureType.QrCode);
const qrCode = signatures[0];
const retrievedData = qrCode.getData(groupdocs.signature.options.sign.HIBCPASData);
console.log("\nHIBCPASData retrieved successfully:");
console.log(retrievedData);
}
module.exports = signAndSearchHIBCPASData;
Add ability to create text signature in the word headers and footers
🌐 We are thrilled to unveil an exciting enhancement— the addition of a text signature feature in the Word document headers and footers. Now, users can easily create and customize text signatures directly within the headers and footers of their Word documents. New enum ShapePosition has been added, which defines appropriate signature location in the document layout. It can be configured through the new property ShapePosition in the TextSignOptions.
const fs = require('fs');
const path = require('path');
async function signDocumentWithTextSignatures(groupdocs, filePath, outputFilePath) {
// Initialize Signature instance
const signature = new groupdocs.signature.Signature(filePath);
// Create an array to hold sign options
const listOptions = [];
// Define header text sign option
const headerSign = new groupdocs.signature.options.sign.TextSignOptions("Hello header!");
headerSign.shapePosition = groupdocs.signature.options.sign.ShapePosition.Header;
// Define footer text sign option
const footerSign = new groupdocs.signature.options.sign.TextSignOptions("Hello footer!");
footerSign.shapePosition = groupdocs.signature.options.sign.ShapePosition.Footer;
// Add sign options to the list
listOptions.push(headerSign);
listOptions.push(footerSign);
// Sign document to file with list of sign options
await signature.sign(outputFilePath, listOptions);
console.log(`Document signed with text signatures. File saved at ${outputFilePath}`);
}
module.exports = signDocumentWithTextSignatures;
Added functionality to insert image signatures into the header or footer of Word processing documents.
🌐 We are thrilled to unveil an exciting enhancement— the addition of a image signature feature in the Word document headers and footers. Now, users can easily create and customize image signatures directly within the headers and footers of their Word documents.
const fs = require('fs');
const path = require('path');
async function signDocumentWithImageSignature(groupdocs, filePath, outputFilePath, imageFilePath) {
// Initialize Signature instance
const signature = new groupdocs.signature.Signature(filePath);
// Create ImageSignOptions for the image signature
const options = new groupdocs.signature.options.sign.ImageSignOptions(imageFilePath);
options.left = 100;
options.top = 100;
options.allPages = true;
options.shapePosition = groupdocs.signature.options.sign.ShapePosition.Header;
// Sign document to file with image signature options
await signature.sign(outputFilePath, options);
console.log(`Document signed with image signature. File saved at ${outputFilePath}`);
}
module.exports = signDocumentWithImageSignature;
Added functionality to insert Barcode/QrCode signatures into the header or footer of Word processing documents.
🌐 We are thrilled to unveil an exciting enhancement— the addition of a Barcode/QrCode signature feature in the Word document headers and footers. Now, users can easily create and customize Barcode/QrCode signatures directly within the headers and footers of their Word documents.
// Sign document with QrCode signature.
const fs = require('fs');
const path = require('path');
async function signDocumentWithQRCode(groupdocs, filePath, outputFilePath, qrCodeText) {
// Initialize Signature instance
const signature = new groupdocs.signature.Signature(filePath);
// Create QrCodeSignOptions for the QR code signature
const options = new groupdocs.signature.options.sign.QrCodeSignOptions(qrCodeText);
options.encodeType = groupdocs.signature.options.sign.QrCodeTypes.QR;
options.left = 100;
options.top = 100;
options.shapePosition = groupdocs.signature.options.sign.ShapePosition.Header;
// Sign document to file with QR code options
await signature.sign(outputFilePath, options);
console.log(`Document signed with QR code. File saved at ${outputFilePath}`);
}
module.exports = signDocumentWithQRCode;
Added functionality to insert Stamp signatures into the header or footer of Word processing documents.
🌐 We are thrilled to unveil an exciting enhancement— the addition of a Stamp signature feature in the Word document headers and footers. Now, users can easily create and customize Stamp signatures directly within the headers and footers of their Word documents.
const fs = require('fs');
const path = require('path');
async function signDocumentWithStamp(groupdocs, filePath, outputFilePath) {
// Initialize Signature instance
const signature = new groupdocs.signature.Signature(filePath);
// Create StampSignOptions for the stamp signature
const options = new groupdocs.signature.options.sign.StampSignOptions();
options.left = 100;
options.top = 100;
options.shapePosition = groupdocs.signature.options.sign.ShapePosition.Header;
// Setup outer lines of the stamp
const outerLine = new groupdocs.signature.options.sign.StampLine();
outerLine.text = " * European Union * European Union * European Union *";
outerLine.height = 22;
outerLine.textBottomIntent = 6;
outerLine.textColor = groupdocs.signature.options.sign.Color.darkGray;
outerLine.backgroundColor = groupdocs.signature.options.sign.Color.cyan;
options.outerLines.add(outerLine);
// Setup inner lines (horizontal lines inside the stamp)
const innerLine = new groupdocs.signature.options.sign.StampLine();
innerLine.text = "John";
innerLine.textColor = groupdocs.signature.options.sign.Color.magenta;
innerLine.font.bold = true;
innerLine.height = 40;
options.innerLines.add(innerLine);
// Sign document to file with stamp options
await signature.sign(outputFilePath, options);
console.log(`Document signed with stamp signature. File saved at ${outputFilePath}`);
}
module.exports = signDocumentWithStamp;
Reorganization of some classes
🌐 We’ve moved the SignatureExtension, SpreadsheetPosition and TextShadow classes to the new namespace com.groupdocs.signature.domain.extensions.signoptions.