Giter VIP home page Giter VIP logo

java2word's People

Contributors

artur-kovalchuk avatar leonardoanalista avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java2word's Issues

interacting with wps office

I'm trying to get java2word to create .doc files compatible with WPS Office. As it is I have to tweak TestUtils.createLocalDocument() to get the api to write any kind of file but the os doesn't even recognize the file I create. And further it's my understanding that a .doc file is binary whereas myDoc.getContent() is all xml. How do I create a .doc file I can pull up in WPS Office?

Android Support

Hi
two feature i will add
1-Android Support
2-XHTML to DOCX

set up travis ci

This task needs a volunteer to set up travisci, codecov and badges on readme.

No information on making the code work on a standalone application.

Had to fire this out on my own on making the library work without using servlet , making this work on a standard jframe netbeans application.

Here is what I used, I would like to see this on the main page to help others or atleast make a note of it somewhere so it could be of help to others.

    //Create the word document
    IDocument myDoc = new Document2004();
    
    JFileChooser chooser = new JFileChooser();
    chooser.setCurrentDirectory(new java.io.File(".CorrectiveActionForm.doc"));
    chooser.setDialogTitle("Save Doc to Where.");
    chooser.setFileFilter(new FileNameExtensionFilter("Word Document (.doc)", "doc"));
    chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    chooser.setAcceptAllFileFilterUsed(false);
    
    
    String path = null;

    if (chooser.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) 
    {
        
      System.out.println("getCurrentDirectory(): " + chooser.getCurrentDirectory());
      System.out.println("getSelectedFile() : " + chooser.getSelectedFile());
    } 
    else 
    {
      System.out.println("No Selection ");
      setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
      JOptionPane.showMessageDialog(this, "File Save Canceled.");
      return;
    }
    
    if(!chooser.getSelectedFile().toString().isEmpty())
    {
        if(!chooser.getSelectedFile().toString().endsWith(".doc"))
        {
            path = chooser.getSelectedFile().toString() + ".doc";
        }
        else 
        {
            path = chooser.getSelectedFile().toString();
        }
    }
    else
    {
      System.out.println("No Selection made");  
      setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
      JOptionPane.showMessageDialog(this, "File Save Canceled.");
      return; 
    }
    
    
    PrintWriter writer = null;
    try {
    writer = new PrintWriter(path);
    } catch (FileNotFoundException e) {
    e.printStackTrace();
    }
     
    
    SimpleDateFormat format1 = new SimpleDateFormat("MM-dd-yyyy");
    String dateOneFrom = format1.format(new Date());
    
    // sets up creating the document
    myDoc.encoding(Encoding.UTF_8); //or ISO8859-1. Default is UTF-8cvbcv
    myDoc.getHeader().addEle(Paragraph.withPieces(ParagraphPiece.with("Corrective Action Form ").withStyle().bold().create()));
    addTitlePage(myDoc);
    addContent(myDoc);
    
    String myWord = myDoc.getContent(); 

    writer.println(myWord); 
    
    writer.close();

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.