[Bug 61467] Created word file using apache poi api is corrupted after adding the image to word doc.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61467 --- Comment #3 from Mark Murphy--- (In reply to chandanam1412 from comment #2) > xWPFParagraph title = doc.createParagraph(); > XWPFRun run = title.createRun(); > run.setText("Fig.1 A Natural Scene"); > run.setBold(true); > title.setAlignment(ParagraphAlignment.CENTER); > > String imgFile = "C:\\WordGenerator\\Congisoft_Logo.png"; > FileInputStream is = new FileInputStream(imgFile); > run.addBreak(); > run.addPicture(is, XWPFDocument.PICTURE_TYPE_JPEG, imgFile, > Units.toEMU(200), Units.toEMU(200)); // 200x200 pixels > is.close(); > > FileOutputStream fos = new FileOutputStream("F:\\test4.docx"); > doc.write(fos); > fos.flush(); > fos.close(); > > > /// > Whole i am trying to open my word document. > Error popup message - ".doc cannot be opened because there are problems with > the contents." So you are wondering why adding a PNG, but telling POI that it is a JPEG produces a corrupted document? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
[Bug 61467] Created word file using apache poi api is corrupted after adding the image to word doc.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61467 --- Comment #2 from chandanam1...@gmail.com --- xWPFParagraph title = doc.createParagraph(); XWPFRun run = title.createRun(); run.setText("Fig.1 A Natural Scene"); run.setBold(true); title.setAlignment(ParagraphAlignment.CENTER); String imgFile = "C:\\WordGenerator\\Congisoft_Logo.png"; FileInputStream is = new FileInputStream(imgFile); run.addBreak(); run.addPicture(is, XWPFDocument.PICTURE_TYPE_JPEG, imgFile, Units.toEMU(200), Units.toEMU(200)); // 200x200 pixels is.close(); FileOutputStream fos = new FileOutputStream("F:\\test4.docx"); doc.write(fos); fos.flush(); fos.close(); /// Whole i am trying to open my word document. Error popup message - ".doc cannot be opened because there are problems with the contents." -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org
Re: git repo is not in synch with svn
On Wed, 21 Mar 2018, pj.fanning wrote: Anyone know who to contact about https://github.com/apache/poi being out of sync with svn? What happens is that SVN syncs with http://git.apache.org/ , then Github syncs with that Drop an email to us...@infra.apache.org with details of the last SVN revision that sync'd over OK, the git commit hash of that commit, and the SVN revisions that have failed to sync. They'll then investigate / prod the sync system / etc Nick - To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org