GroupDocs.Watermark for Node.js via Java 24.11 Release Notes

We are excited to announce the latest release of our product, designed with Node.js developers in mind. This update brings powerful new features and critical bug fixes, further enhancing the integration and performance of our platform for Node.js environments. Whether you’re utilizing the latest enhancements or enjoying a smoother, more reliable experience, this release underscores our commitment to empowering Node.js developers with innovative tools for seamless and efficient development.

Full list of changes in this release

KeyCategorySummary
WATERMARKNODEJS-5★ FeatureImplemented ability to create tiled watermarks
WATERMARKNODEJS-6★ FeatureImplemented ability to use custom fonts for text watermarks
WATERMARKNODEJS-7🔧 FixAdding annotation watermark in the pdf document takes long time
WATERMARKNODEJS-8🔧 FixBackground color is presenting when using PdfXObjectWatermarkOptions

Implemented ability to create tiled watermarks

🌐 Our latest release introduces an exciting new feature: the ability to create tiled watermarks. This enhancement allows you to generate repetitive watermark patterns with ease, offering greater flexibility and control for protecting your digital assets. Node.js developers can now seamlessly incorporate this functionality into their workflows, combining efficiency with enhanced visual customization to meet a wide range of project needs.

const groupdocsWatermark = require('@groupdocs/groupdocs.watermark')

function addTiledWatermark() {
 
  const watermarker = new groupdocsWatermark.Watermarker('sample.docx');

  const watermark = new groupdocsWatermark.TextWatermark('top secret', new groupdocsWatermark.Font('Arial', 36));
  watermark.setRotateAngle(45);
  watermark.setOpacity(0.4);
  watermark.setForegroundColor(groupdocsWatermark.Color.getRed());

  // Configure tile options
  watermark.setTileOptions(new groupdocsWatermark.TileOptions());
  watermark.getTileOptions().setTileType(groupdocsWatermark.TileType.Straight)
  watermark.getTileOptions().setRotateAroundCenter(false);
  
  //Setting lineSpacing with methods
  var lineSpacing = new groupdocsWatermark.MeasureValue();
  lineSpacing.setMeasureType(groupdocsWatermark.TileMeasureType.Percent);
  lineSpacing.setValue(22);
  watermark.getTileOptions().setLineSpacing(lineSpacing);

  // Setting watermarkSpacing with methods
  var watermarkSpacing= new groupdocsWatermark.MeasureValue();
  watermarkSpacing.setMeasureType(groupdocsWatermark.TileMeasureType.Percent);
  watermarkSpacing.setValue(10);
  watermark.getTileOptions().setWatermarkSpacing(watermarkSpacing);

  watermarker.add(watermark);
  watermarker.save('result.docx');
  watermarker.close();
}

Implemented ability to use custom fonts for text watermarks

🌐 This update introduces an exciting enhancement: the ability to use custom fonts for text watermarks. With this feature, you can tailor watermarks to match your branding or design preferences, offering a new level of creativity and precision. Node.js developers can now seamlessly incorporate this flexibility into their workflows, ensuring a more personalized and professional approach to asset protection

const groupdocsWatermark = require('@groupdocs/groupdocs.watermark')

function addTextWatermarkWithCustomFont() {
  var fontsFolder = 'c:\Fonts';
  const watermarker = new groupdocsWatermark.Watermarker("sample.pdf");

  // Initialize the font to be used for watermark and folder with it
  var font = new groupdocsWatermark.Font("OT Chekharda Bold Italic", fontsFolder, 36)
  const watermark = new groupdocsWatermark.TextWatermark('top secret', font);

  watermark.setForegroundColor(groupdocsWatermark.Color.getRed());
  watermark.setX(10);
  watermark.setY(300);
  watermark.setOpacity(0.4);

  watermarker.add(watermark);
  watermarker.save("result.pdf");
  watermarker.close();
}