GroupDocs.Metadata for Node.js via Java

Adding Metadata To JPEG In JavaScript

Add custom metadata properties to a wide range of business documents, images, audio & video file formats using GroupDocs.Metadata for Node.js via Java.

Steps for adding Metadata to JPEG in JavaScript

GroupDocs.Metadata makes it easy for Node.js via Java developers to add metadata details to JPEG files from within their applications by implementing a few easy steps.

  1. Load JPEG with an instance of Metadata class.
  2. Use Metadata.AddProperties method to add the properties.
  3. Use a predicate to find desired metadata properties.
  4. Save the changes back in JPEG format.

    // load the file in an instance of Metadata class
    const metadata = new groupdocs.metadata.Metadata('input.jpeg');

    // add a property containing the content author
    var affected = metadata.addProperties(new groupdocs.metadata.ContainsTagSpecification(
        groupdocs.metadata.Tags.getTime().getPrinted()), 
        new groupdocs.metadata.PropertyValue(new Date()));

    // process operation results
    console.log('Affected properties: ${affected}');

    // save the file with updated metadata
    metadata.save('output.jpeg');
npm i @groupdocs/groupdocs.metadata
click to copy
copied
More examples Documentation

Document Metadata Management

Our comprehensive API streamlines managing document metadata. Access, edit, and manipulate various document properties for improved organization and searchability.

Metadata Functionality

Metadata Access

Effortlessly retrieve and process a document’s metadata. Gain insights into properties like author, creation date, and many others.

Metadata Editing

Modify document metadata directly. Update properties for better organization, searchability, and information accuracy.

Advanced Metadata Management

Perform complex operations on document metadata. Efficiently handle tasks like adding custom properties, deleting irrelevant data, and ensuring data consistency.

How to clear image from undesirable metadata

This code sample shows how to remove EXIF metadata from a file

TypeScript


//  pass image to the Metadata class constructor
const metadata = new groupdocs.metadata.Metadata('input.tiff');

//  access EXIF root package
var root = metadata.getRootPackage();

//  remove metadata
root.setExifPackage(null);

//  save cleared file
metadata.save('output.tiff');

About GroupDocs.Metadata for Node.js via Java API

GroupDocs.Metadata for Node.js via Java is an advanced metadata fields management and manipulation solution to easily view, update, remove, find, compare, exchange and export metadata information from images and document formats without using any external software. Add metadata details to Word documents, Excel spreadsheets, PowerPoint presentations, Outlook emails, OneNote, Visio, Project, PDF, AutoCAD, ZIp, Audio and Video file formats along with the support for working with many other metadata processing features.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Metadata for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Adding Metadata Properties To Other File Formats

Multi format documents and images metadata addition API for Node.js via Java. Retrieve metadata of some of the popular file formats as stated below.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English