j2docx j2docx
JAVA API to write MS Word 2007/2010 docx documents
Status: Beta
Brought to you by:
vino16405
Welcome to your wiki!
This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
The wiki uses Markdown syntax.
Point docx document and write
J2DOCX-“Java to docx” is a java approach to write the contents programmatically over the Microsoft docx documents and to manipulate the document. This API comprises set of useful funtions to work with docx. The version 1.0 supports only writing of text and images.
Sample Programs:
Sample Program:1
import java.io.FileNotFoundException;
import java.io.IOException;
import org.jdom.JDOMException;
import com.j2docx.operations.DOCXHandler;
import com.j2docx.spray.BookmarkSprayer;
import com.j2docx.util.DocxHandlerException;
/*
* @author j2docx
* Demo for spraying text
/
public class TextSpray {
public static void main(String[] args) {
}
Sample Program:2
import java.io.FileNotFoundException;
import java.io.IOException;
import org.jdom.JDOMException;
import com.j2docx.operations.DOCXHandler;
import com.j2docx.spray.BookmarkSprayer;
import com.j2docx.util.DocxHandlerException;
/*
* @author j2docx
* Demo for spraying image
/
public class ImageSpray {
public static void main(String[] args) {
BMSprayer.sprayImage(extractedPath, bookmarkName,70,180, "C:/images/sample_image.jpg");
}
Last edit: Vinothkumar PT 2012-10-28