package bril.com.cn.poidemo;

import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    public static String PATH= Environment.getExternalStorageDirectory().getPath()+"/documentocr/docs";
    private String content;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        AssetUtil.copyFile(this, "demo.docx",PATH);
        content=getResources().getString(R.string.content);

        findViewById(R.id.btn).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                PoiUtil.exportWord(MainActivity.this,PATH+"/documentocr/docs/test.doc",content);

            }
        });
    }

}
