TextDevice

Vue de l’ensemble

‘TextDevice’ est une classe dans Aspose.PDF FOSS pour Java.

Écran de texte d’une page PDF et l’écrit dans un flux de sortie.

Cette classe fournit 10 méthodes pour travailler avec les objets TextDevice dans les programmes Java. Les méthodologies disponibles comprennent: TextDivice, getEncoding , ghetExtractionOptions ; process; ‘setEnkodageetsetEextraction Options’. Tous les membres publics sont accessibles à n’importe quelle application Java après l’installation de l’Aspose.PDF FOSS pour le package Java . Propriétés : DEFAULT_ENCODING., encodement.

Propriétés

NameTypeAccessDescription
extractionOptionsTextExtractionOptionsReadReturns the current extraction options.
encodingCharsetReadReturns the current output encoding.
DEFAULT_ENCODINGCharsetRead{@link Charset} matching .NET {@code Encoding.Unicode} (UTF-16 little-endian, no BOM).

méthodes

SignatureDescription
TextDevice()Creates a TextDevice with default options ({@code Pure} mode) and Unicode encoding.
TextDevice(encoding: Charset)Creates a TextDevice with the given encoding and default options ({@code Pure} mode).
TextDevice(options: TextExtractionOptions)Creates a TextDevice with the given options and default Unicode encoding.
TextDevice(options: TextExtractionOptions, encoding: Charset)Creates a TextDevice with the given options and encoding.
getExtractionOptions()TextExtractionOptionsReturns the current extraction options.
setExtractionOptions(options: TextExtractionOptions)Sets the extraction options (null is replaced with the default {@code Pure} options).
getEncoding()CharsetReturns the current output encoding.
setEncoding(encoding: Charset)Sets the output encoding (null is replaced with the default Unicode/UTF-16LE).
process(page: Page, output: OutputStream)Extracts text from a page and writes it to the output stream using the
configured encoding.
process(page: Page, outputFile: String)Extracts text from a page and writes it to the file at {@code outputFile}
using the configured encoding.

Voir aussi

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