I tried pdf generation and never it created one similar to word , pdf is adding lot of minus signs, some places it removes the blank line .... etc.
does pdf works for all others? what is work around to make pdf right ?
It is currently Fri Apr 04, 2025 1:17 pm
WordprocessingMLPackage wordMLPackage =
WordprocessingMLPackage .load(new java.io.File("e://dev//java2word//word2java//ADL.docx"));
MainDocumentPart documentPart = wordMLPackage.getMainDocumentPart();
String xpath = "//w:r[w:t[contains(text(),'auditFindings')]]";
List<Object> list = documentPart.getJAXBNodesViaXPath(xpath, true);
for(Object obj : list){
List<Object> objContent=((R)obj).getContent();
objContent.clear();
objContent.add(getAuditFinding());
objContent.add(getFindingText());
}
wordMLPackage.save(new File("e://dev//java2word//word2java//ADL-new-2.docx"));
@Override
public List<Object> apply(Object object) {
if (object instanceof org.docx4j.wml.Text){
Text wText=(org.docx4j.wml.Text) object;
if(wText.getValue().equals("formattedAuditNumber")){
wText.setValue("A-123-456-9876");
}
}
return null;
}
Index: BindingHandler.java
===================================================================
--- BindingHandler.java (revision 1700)
+++ BindingHandler.java (working copy)
@@ -328,7 +328,7 @@
int pos = text.indexOf("http://");
- if (pos==-1) {
+ if (pos==-1 || hyperlinkStyleId == null) {
addRunToDocFrag(sourcePart, docfrag, text, rPr);
return;
}
Employee Code: ${Code}
Employee Name: ${Name}
Employee Designation: ${Designation}
Attendance Table:
Date Day In Time Out Time
1/11/11 Tue 08.00 AM 06.00 PM
Employee Code: 100
Employee ...
Total posts 10157 • Total topics 2857 • Total members 2087