XimageCollétion

Vue de l’ensemble

‘XImageCollection’ est une classe dans Aspose.PDF FOSS pour Java.Déduit de: Iterable<Ximage>.

Collection d’image XObjects du dictionnaire de ressource /XObject d’une page.

Cette classe fournit 13 méthodes pour travailler avec des objets XImageCollection dans les programmes Java. Les méthodologies disponibles comprennent: ‘XImagesCollections’, ‘add’ , ‘delete’ ; ‘getCount’, `getNames’ et ‘iterator’, “replace” et “size”. Tous les membres publics sont accessibles à n’importe quelle application Java après l’installation de la version Aspose.PDF FOSS pour le package Java . Propriétés : ‘conte’, «nombre’.

Propriétés

NameTypeAccessDescription
countintReadReturns the number of images.
namesString[]ReadReturns an array of all image resource names in this collection.

méthodes

SignatureDescription
XImageCollection(resourcesDict: PdfDictionary, xobjectDict: PdfDictionary, parser: PDFParser)Creates an XImageCollection from an /XObject dictionary.
XImageCollection(xobjectDict: PdfDictionary, parser: PDFParser)Creates an XImageCollection from an /XObject dictionary.
get(index: int)XImageReturns the image at the given 1-based index.
get(name: String)XImageReturns the image by resource name (e.g., “Im1”).
getCount()intReturns the number of images.
size()intReturns the number of images (alias for {@link #getCount()}).
getNames()String[]Returns an array of all image resource names in this collection.
iterator()Iterator<XImage>
add(imageStream: InputStream)Adds an image from an input stream to this collection.
delete(index: int)Deletes the image at the given 1-based index from the parent /XObject dictionary.
delete(name: String)Deletes the image with the given resource name.
replace(index: int, newImageStream: InputStream)Replaces the image at the given 1-based index with a new image.
replace(name: String, newImageStream: InputStream)Replaces the image with the given resource name with a new image.

Voir aussi

  • Aspose.PDF pour Java — API d’entreprise
 Français