Word.ImageFormat enum

Notes

Cet API est fourni en tant qu’aperçu pour les développeurs et peut être modifié en fonction des commentaires que nous avons reçus. N’utilisez pas cet API dans un environnement de production.

Remarques

[ Ensemble d’API : WordApi BETA (PRÉVERSION UNIQUEMENT) ]

Exemples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/insert-and-get-pictures.yaml

// Gets the first image in the document.
await Word.run(async (context) => {
  const firstPicture = context.document.body.inlinePictures.getFirst();
  firstPicture.load("width, height, imageFormat");

  await context.sync();
  console.log(`Image dimensions: ${firstPicture.width} x ${firstPicture.height}`);
  console.log(`Image format: ${firstPicture.imageFormat}`);
  // Get the image encoded as Base64.
  const base64 = firstPicture.getBase64ImageSrc();

  await context.sync();
  console.log(base64.value);
});

Champs

bmp = "Bmp"
emf = "Emf"
exif = "Exif"
gif = "Gif"
icon = "Icon"
jpeg = "Jpeg"
pdf = "Pdf"
pict = "Pict"
png = "Png"
svg = "Svg"
tiff = "Tiff"
undefined = "Undefined"
unsupported = "Unsupported"
wmf = "Wmf"