poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Javen O'Neal" <javenon...@gmail.com>
Subject Re: Strange behavior in XWPF
Date Wed, 01 Jun 2016 20:47:05 GMT
Here: https://bz.apache.org/bugzilla/show_bug.cgi?id=58779
On Jun 1, 2016 13:07, "Murphy, Mark" <murphymdev@metalexmfg.com> wrote:

> If I open a document template:
>
> XWPFDocument document = new
> XWPFDocument(POIXMLDocument.openPackage("Normal.dotm"));
>
> Add some text:
>
> XWPFParagraph paragraph = document.createParagraph();
> XWPFRun run = paragraph.createRun();
> run.setText("At tutorialspoint.com, we strive hard to "
>                 + "provide quality tutorials for self-learning "
>                 + "purpose in the domains of Academics, Information "
>                 + "Technology, Management and Computer Programming
> Languages.");
>
> Then write to a different file:
>
> FileOutputStream out = new FileOutputStream(new File(
>                 "createdocument.docx"));
> document.write(out);
> out.close();
> document.close();
> System.out.println("createdocument.docx written successully");
>
>
> The new file is created, but the template is updated as well!!
>
> Any ideas of where to look?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message