There might be cases when the document is presented only as a stream (without a copy on the local disk). To avoid the overhead of saving documents to the disk, GroupDocs.Parser enables to extract data from streams directly.
The following example shows how to load the document from the stream:
// Create the stream try (InputStream stream = new FileInputStream(Constants.SamplePdf)) { // Create an instance of Parser class with the stream try (Parser parser = new Parser(stream)) { // Extract a text into the reader try (TextReader reader = parser....Markdown Product Solution GroupDocs...Product Solution GroupDocs.Editor Product Solution GroupDocs...
This code snippet demonstrates how to extract information about known properties that can be encountered in a particular package.
Load a file to examine Get a collection of PropertyDescriptor instances for any desired metadata package Iterate through the extracted descriptors advanced_usage.GettingKnownPropertyDescriptors
try (Metadata metadata = new Metadata(Constants.InputDoc)) { WordProcessingRootPackage root = metadata.getRootPackageGeneric(); for (PropertyDescriptor descriptor : root.getDocumentProperties().getKnowPropertyDescriptors()) { System.out.println(descriptor.getName()); System.out.println(descriptor.getType()); System.out.println(descriptor.getAccessLevel()); for (PropertyTag tag : descriptor.getTags()) { System.out.println(tag); } System.out.println(); } } Note Not all possible properties are presented in the getKnowPropertyDescriptors collection....Markdown Product Solution GroupDocs...Product Solution GroupDocs.Editor Product Solution GroupDocs...
This topic explains how to verify Text electronic signatures with GroupDocs.Signature API....Markdown Product Solution GroupDocs...Product Solution GroupDocs.Editor Product Solution GroupDocs...
This article explains how to save signed Presentation documents with various file formats by GroupDocs.Signature API....Markdown Product Solution GroupDocs...Product Solution GroupDocs.Editor Product Solution GroupDocs...
This article explains how to load from stream while using GroupDocs. Watermarks Java API....Markdown Product Solution GroupDocs...Product Solution GroupDocs.Editor Product Solution GroupDocs...
This article explains how to load PDF, Word, Excel, PowerPoint documents from local disk when using GroupDocs.Merger for Java....Markdown Product Solution GroupDocs...Product Solution GroupDocs.Editor Product Solution GroupDocs...
Explore real-world scenarios for GroupDocs.Metadata for Node.js via Java, such as comparing document metadata across versions and extracting hidden properties....Markdown Product Solution GroupDocs...Product Solution GroupDocs.Editor Product Solution GroupDocs...
Load from Stream As an alternative to a local file, Redactor can open a document from stream.
The following example demonstrates how to load and redact a document using Stream:
final FileInputStream stream = new FileInputStream("sample.docx"); try { final Redactor redactor = new Redactor(stream); try { // Here we can use document instance to make redactions redactor.apply(new DeleteAnnotationRedaction()); redactor.save(); } finally { redactor.close(); } } finally { stream.close(); }...Markdown Product Solution GroupDocs...Product Solution GroupDocs.Editor Product Solution GroupDocs...
Load from local disc GroupDocs.Redaction.Redactor class is a main class in Redaction API, providing functionality to open a document. When document is located on the local disk, you can pass its path to *Redactor *class constructor.
The following example demonstrates how to open a document from local disc:
final Redactor redactor = new Redactor("sample.docx"); try { // Here we can use document instance to perform redactions redactor.apply(new DeleteAnnotationRedaction()); redactor.save(); } finally { redactor....Markdown Product Solution GroupDocs...Product Solution GroupDocs.Editor Product Solution GroupDocs...
GroupDocs.Parser provides API to extract a text from image files and non-text PDFs documents. The following articles describe how to use API to extract data and integrate any paid or free OCR solution to GroupDocs.Parser....Markdown Product Solution GroupDocs...Product Solution GroupDocs.Editor Product Solution GroupDocs...