Coder Social home page Coder Social logo

ibkisthere / doc_text Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gabbygreat/doc_text

0.0 0.0 0.0 5.06 MB

A flutter plugin to extract the content of a DOC file as String

License: MIT License

Ruby 9.52% Objective-C 0.26% Kotlin 26.18% Dart 56.39% Swift 7.66%

doc_text's Introduction

doc_text

A Flutter plugin for extracting the content of a Word document (.doc or .docx) as a plain text string. This plugin supports reading text from Word documents on both Android and iOS platforms, making it easier to integrate document handling into your Flutter applications.

Description

The doc_text plugin provides a straightforward method to extract text from Word documents. This can be particularly useful for applications that need to read, display, or process the content of document files without requiring external applications.

Demo Video

Setup

Android

To use this plugin on Android, you need to ensure that your project's minSdkVersion is set to 26 or higher due to the dependencies used for reading Word documents.

Open your Android project's build.gradle file located in your_project/android/app/build.gradle and update the minSdkVersion to 26:

android {
    ...

    defaultConfig {
        ...
        minSdkVersion 26
        ...
    }
}

iOS

Due to limitations in iOS's native support for .doc and .docx formats, this plugin currently offers limited functionality on iOS platforms. Please consider using alternative methods for document handling on iOS.

Adding the Plugin

Add doc_text to your pubspec.yaml file:

dependencies:
  doc_text: ^0.0.1
import 'package:doc_text/doc_text.dart';


void main() async {
  final String filePath = 'path/to/your/document.docx';
  final String? extractedText = await DocText.extractTextFromDoc(filePath);

  if (extractedText != null) {
    print(extractedText);
  } else {
    print('Failed to extract text from document.');
  }
}

Contributing

We welcome contributions to the doc_text plugin! If you'd like to contribute, please fork the repository and submit pull requests. For major changes or new features, please open an issue first to discuss what you would like to add or change.

License

doc_text is available under the MIT license. See the LICENSE file for more info.

doc_text's People

Contributors

gabbygreat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.