Git Product home page Git Product logo

docuconverter's Introduction

DocuConverter

A standalone Java Library and API to convert the Microsoft Office Documents to other format very quickly.

Note: This API is build on JDK 1.8 and hence it requires JRE 8 or above to run.

Features

  • Light Weight process
  • Quick Conversion
  • Less fail rates

Why I wrote this API

I faced many problem in converting files from one format to another format from, say, DOCX to PDF and to do that simple task, any one have to look to many sources to get the working code, otherwise have to use other properity software or heavy softwares to convert them. For many developers, this was the headache to code and test and so on... so to solve this problem and keeping in mind the headache of this searching, I created this API which is very handy to use, and can be also used in your Applications too

API Uses in your program

    File inFile = new File("test/test.docx");
    File outFile = new File("test/testDocX.pdf");
    DocuConverter docuConverter = DocuConverter.getConverter(new FileInputStream(inFile),
            DocumentType.DOCX, ConvertToType.PDF);
    docuConverter.setVerbose(true); //optional, only if you want the log output
    docuConverter.convertIn(new FileOutputStream(outFile));

Any OutputStream and InputStream can be used here, Like to get the code in ByteArrayOutputStream, we can write

    File inFile = new File("test/test.docx");
    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    DocuConverter docuConverter = DocuConverter.getConverter(new FileInputStream(inFile),
            DocumentType.DOCX, ConvertToType.PDF);
    docuConverter.setVerbose(true); //optional, only if you want the log output
    docuConverter.convertIn(byteArrayOutputStream);
    System.out.println(byteArrayOutputStream);

Including API in your project

See Adding Dependency to project

Use from System Console

Console Parameters

 -help (-h)                : Shows this message
 -input (-i, -in) <path>   : Specifies input file path
 -output (-o, -out) <path> : Specifies output file path
 -verbose (-v)             : To see intermediate processing messages.
 -version (-ver)           : View current Library Version

Console Usage

java -jar .\DocuConverter.jar -in < path > -out < path >  -v
java -jar .\DocuConverter.jar -in .\test.docx -out .\test.pdf -v
java -jar .\DocuConverter.jar -in .\test.pptx -out .\test.pdf

Included Libraries

  • Apache POI
  • Args4j
  • Apache Commons Collection
  • DocX4J
  • iTextPDF
  • And others, please see lib folder

Current Supported Conversion Types

  • DOCX to PDF
  • PPTX to PDF
  • TXT to PDF
  • PPT to PDF
  • CSV to XML

Copyright © 2019 Chirag Gupta (https://github.com/chirag-ji) under MIT Licence

docuconverter's People

Contributors

chirag-ji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docuconverter's Issues

Dublicate Runnable Issue

Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable

Duplicate class found

After adding the library in my app-level build.gradle file, I am now getting tons of error saying Duplicate class found. I checked my libs folder as well but it's empty. Almost tried all the solutions on StackOverflow but no luck. Any guesses?

DocuConverter.jar giving error on compile

Error: MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)

When I compile app this error comes im a lil new please help

All I did was add jar file in libs folder in android project please help

This is my min and max api

applicationId "com.example.myapplication"
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"

it will be fix if I do minSdkVersion 26 but if I do that there be no point for converter since it will decrease range too much so does this docuConverter only works for latest smartphone ?

Help i cant use this keep getting exception duplicates or error

Hi i am making a document reader simply i want to convert word, ppt to pdf and open excel but i cant seem to get it to work i have tried everything can you please help me i have been at it for week still no progress i even tried to copy all jar files from lib to my lib but still having problem specially when i try to convert to pdf

I am using android studio version : arctic fox
Can you give me a working code i will be forever in your debt
email: [email protected]

Not implementing in gradle

hi i am trying to install this dependencies but its not working
it give me this below error:
Failed to resolve: com.github.chirag-ji:DocuConverter:2.0.0
Show in Project Structure dialog
Affected Modules: app

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.