Hello,
I'd like to know if there is any way of inserting some random content at the begining of the second page of an existing docx file?
Thanks
Heitor Florido
It is currently Thu Oct 22, 2026 5:15 pm
News of docx4jNow I am trying to converting doc file into docx file using Doc.java but it gives the following exception..
##SummaryInformation
##DocumentSummaryInformation
##WordDocument
##CompObj
##ObjectPool
##1Table
Exception in thread "main" java.io.IOException: block already removed - does your POIFS have circular or duplicate block references?
at org.apache.poi.poifs.storage.BlockListImpl.remove(BlockListImpl.java:97)
at org.apache.poi.poifs.storage.RawDataBlockList.remove(RawDataBlockList.java:32)
at org.apache.poi.poifs.storage.BlockAllocationTableReader.fetchBlocks(BlockAllocationTableReader.java:196)
at org.apache.poi.poifs.storage.BlockListImpl.fetchBlocks(BlockListImpl.java:132)
at org.apache.poi.poifs.storage.RawDataBlockList.fetchBlocks(RawDataBlockList.java:32)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.processProperties(POIFSFileSystem.java:542)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:176)
at org.apache.poi.hwpf.HWPFDocument.verifyAndBuildPOIFS(HWPFDocument.java:133)
at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:146)
at org.docx4j.convert.in.Doc.convert(Doc.java:58)
at org.docx4j.convert.in.Doc.main(Doc.java:396)
I think this line gives error
HWPFDocument ...
Total posts 10258 • Total topics 2896 • Total members 2110