Author Archive

JavaDocX 2.6: new release

October 28th, 2013 | No Comments »

We would like to announce the release of a new version of JAVADocX that incorporates several improvements and a few bug fixes.

The major changes since the 2.0 version are summarized as follows:

* Integration of a conversion plugin that allows for the transformation of Word (.docx) documents into PDF, RTF, HTML or DOC (legacy Word format) format.
* New addRawWordML that allows for the insertion of arbitrary WordML fragments into your document.
* One may now insert input fields and checkboxes via the addInput and addCheckbox method.
* One may insert, or replace a placeholder variable by, an external DOCX, RTF, MHT or HTML document.

We have also updated the website to include a “Trial version” of the PRO package (that does not include the conversion plugin) so you can test the functionality to check if it fits your purposes.

All current owners of a JAVADocX can update their packages for free…although a Tweet, Facebook share or just a link somewhere would be greatly appreciated :-)

Javadocx 2.0.1: bugfixes release

May 6th, 2011 | No Comments »

icon_update.pngToday we launch a small bugfix update of our acclaimed library.

This release fixes a small problem with text in oriental languages ​​that caused a warning when the .docx document created is open.

Additionally, the download now include the .jar compiled.

This update is free for all users and is included in Free and PRO versions of Javadocx.

Javadocx 2.0 is here to stay

March 15th, 2011 | No Comments »

Just some days ago we deploy not only a new version of Javadocx wich grow from the old 1.0 version to 2.0 version, but a new redesigned site and four new licenses based on the demands of the users of the twin brother of Javadocx, PHPdocx.

In fact, Javadocx has many of the features that users has been asking for during last months. We develop, now on java, some cool options that until now was only available on PHPdocx.

And … what´s new?
There are two versions, a Free LGLP’ed version with a lot of new features and a PRO, more sophisticated with even more options:

Free

Text

  • Standard text formatting
  • Formatted paragraphs
  • External links
  • Page breaks
  • Widow/orphan control
  • Lists
  • Custom Language for Documents Free

Structure

  • General design options
  • Headers
  • Footers
  • Page numbering
  • Table of Contents

Tables

  • Basic tables

Images

  • Jpg, gif, png
  • Scaling and resizing

Graphs

  • 2D basic graphs

Math

  • OMML support

Conversion tools

  • PDF
  • HTML

Debugging

  • Unit testing
  • Logger

Extras

  • Avoid race conditions
  • PRO

    Templates

    • Templates for mail merge/multiple documents
    • Templates with Graphics and Pictures
    • Dynamic Generation of lists and tables
    • Multitext on templates
    • Multiple variables on templates

    Text

    • Standard text formatting
    • Formatted paragraphs
    • External links
    • Page breaks
    • Widow/orphan control
    • Lists
    • Nested lists
    • Footnotes
    • Text boxes
    • Text templates
    • Text indenting with spaces and tabs
    • Text with style
    • Custom Language for Documents Free

    Structure

    • General design options
    • Headers
    • Footers
    • Advanced headers/footers
    • Page numbering
    • Table of Contents
    • Sectioning
    • Word Macros

    Tables

    • Basic tables
    • Advanced table formatting
    • Custom styles

    Images

    • Jpg, gif, png
    • Scaling and resizing
    • Advanced formatting

    Graphs

    • 2D basic graphs
    • 2D advanced graphs
    • 3D graphs

    Math

    • OMML support
    • MathML support

    Conversion tools

    • PDF
    • HTML

    Debugging

    • Unit testing
    • Logger

    Multiformatting

    • Create Paragraphs with different formats

    Extras

    • Docx documents on read mode
    • Direct download trough browser
    • Avoid race conditions

pie_chart

December 30th, 2009 | No Comments »

It is obvious that a “half decent” application to generate reports has to include a tool for the creation of charts and graphs on the fly, so javaDocx could not do less than that.
In fact javaDocx is a pretty sophisticated tool to that regard and as we show below is very simple to generate a nice chart from some data that could be extracted from a database, a spreadsheet or elsewhere.

In this example we will concentrate in creating a pie chart that plots the following sample data:

Do you like “paella”?
Like paella: 50%
Don´t like paella: 10%
What the f*** is a paella? : 40%
Notice: paella is a typical Spanish rice dish.


import com.javadocx.*;
import java.util.*;

public class graphic {

  public static void main(String[] args) {
    try {
      com.javadocx.cCreateDocx objDocx = new cCreateDocx("docx");
      HashMap<String, Object> array = new HashMap<String, Object>();

      HashMap<String, ArrayList> data = new HashMap<String, ArrayList>();
      ArrayList<Integer> al = new ArrayList<Integer>();
      al.add(50);
      data.put("like paella", al);
      al = new ArrayList<Integer>();
      al.add(10);
      data.put("do not like paella", al);
      al = new ArrayList<Integer>();
      al.add(40);
      data.put("what the f***…?", al);

      array.put("data", data);
      array.put("type", "pieChart");
      array.put("title", "Do you like paella?");
      array.put("showPercent", "1");
      objDocx.fAddGraphic(array);

      objDocx.fCreateDocx("simple_piechart", new HashMap());
    } catch (Exception e) {
      System.out.println("error " + e.toString());
    }
  }
}



That generates this pie chart.

If you prefer a 3D version of this pie chart you need the Pro version but the required code is not much different:


import com.javadocx.*;
import java.util.*;

public class graphic {

  public static void main(String[] args) {
    try {
      com.javadocx.cCreateDocx objDocx = new cCreateDocx("docx");
      HashMap<String, Object> array = new HashMap<String, Object>();

      HashMap<String, ArrayList> data = new HashMap<String, ArrayList>();
      ArrayList<Integer> al = new ArrayList<Integer>();
      al.add(50);
      data.put("like paella", al);
      al = new ArrayList<Integer>();
      al.add(10);
      data.put("do not like paella", al);
      al = new ArrayList<Integer>();
      al.add(40);
      data.put("what the f***…?", al);

      array.put("data", data);
      array.put("type", "pie3DChart");
      array.put("title", "Do you like paella?");
      array.put("showPercent", "1");
      objDocx.fAddGraphic(array);

      objDocx.fCreateDocx("simple_piechart", new HashMap());
    } catch (Exception e) {
      System.out.println("error " + e.toString());
    }
  }
}

A very simple .docx

December 28th, 2009 | 1 Comment »

JavaDocx keeps simple things simple, and there should be nothing simpler than the usual “Hello World Script” that will allow you to generate a Word document with “Hello World” on it.

A few lines of code will do, assuming you have already installed the JAVADOCX library on your web server.

The code reads:

<br />
import com.javadocx.*;<br />
import java.util.*;</p>
<p>public class text {</p>
<p>public static void main(String[] args) {<br />
try {<br />
com.javadocx.cCreateDocx objDocx = new cCreateDocx(".docx");<br />
HashMap<String, String> array = new HashMap<String, String>();<br />
array.put("text", "Hello World.");<br />
objDocx.fAddText(array);<br />
objDocx.fCreateDocx("hello_world", new HashMap());<br />
} catch (Exception e) {<br />
System.out.println("error " + e.toString());<br />
}<br />
}<br />
}<br />

But if you are a wannabe designer : -) you may try the same document with advanced formatting.

You may center the text and write it in bold characters with one line more of code:

<br />
import com.javadocx.*;<br />
import java.util.*;</p>
<p>public class text {</p>
<p>public static void main(String[] args) {<br />
try {<br />
com.javadocx.cCreateDocx objDocx = new cCreateDocx(".docx");<br />
HashMap<String, String> array = new HashMap<String, String>();<br />
array.put("text", "Hello World.");<br />
array.put("b", "single");<br />
array.put("jc", "center");<br />
objDocx.fAddText(array);<br />
objDocx.fCreateDocx("hello_world", new HashMap());<br />
} catch (Exception e) {<br />
System.out.println("error " + e.toString());<br />
}<br />
}<br />
}<br />

You will not get a job as a designer (to be a programmer is not so bad after all) with this Word document but we hope that this example will prompt you to scan the JAVADOCX documentation.