90
questions
0
votes
0
answers
18
views
Convert HTML to WordML with CSS styling
I have DOCX templates with placeholders enclosed in curly brackets (e.g., {goals}, {objective}, {summary} and etc ). Using LLM API, I generate text to replace these placeholders, with the output in ...
0
votes
1
answer
34
views
docx4j replace placeholder with (x)html converted into WordML, but in result document I see WordML markup tags
I have a code that replaces placeholders like ${NAME} to the plain text.
I use docx4j and docx4j-search-and-replace-util for replacing placeholders.
It works fine, but now in the one of fields "...
0
votes
0
answers
29
views
Updates to wordMLPackage not reflecting in docx file after Docx4J.save() method
Updates to wordMLPackage after Docx4j.bind are not reflecting in final output document file. Using Docx4j 8.2.29
Here is my code :
private R executeTask(Map<String, Object> context,InputStream ...
0
votes
0
answers
38
views
Checkboxes in XSLT: Not Allowed In Restricted Namespaces
I am using xslt to read an xml file and then display it in Microsoft Word. I want to implement checkboxes in my XSLT-files, but it doesn't work.
Currently it looks like this - now updated with full ...
3
votes
1
answer
2k
views
Document.Body.Descendants<SdtBlock>() does not return all *sdt* elements
I'm trying to find all SdtElement in a Word document. I have used the below code:
using (var wordDoc = WordprocessingDocument.Open(FilePath, true))
{
var docSdts = wordDoc.MainDocumentPart....
2
votes
0
answers
287
views
docx4j cannot render <text-indent>
I am using docx4j-ImportXHTML to convert an XHTML into a docx. When rendering to docx I notice it doesn't render CSS text-indent property.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...
0
votes
1
answer
816
views
w:t not an instance of org.docx4j.wml.Text?
I want to extract all bold text from a DOCX file using docx4j but I get a class cast exception with this code:
import java.util.List;
import javax.xml.bind.JAXBException;
import org.docx4j.Docx4J;
...
0
votes
1
answer
108
views
XML Parsing Broken-up Text
I'm looking to parse a word document XML to get the footer information per each paragraph, sentence, or phrase.
This command gets all the text without spaces in between.
pry(main)> doc....
1
vote
2
answers
1k
views
Descendants<T> gets zero elements in Word doc
I am having trouble updating a Hyperlink in a Word doc (Q How to update the body and a hyperlink in a Word doc ) and am zooming in on the Descendants<T>() call not working. Here is my code:
...
0
votes
1
answer
65
views
How to apply styles in word while inserting WordMl in VSTO?
I've made a WordMl package & using "Range.InsertXML" method to insert but word is removing the styles on inserted paragraph.
How can i preserve the styles inserted from wordml?
Below is the ...
0
votes
1
answer
105
views
adding a Carriage Return in XSLT using wordml
I am using XSLT (1.0) to generate a Word Document using WordML. I have different tables and in one of the columns i need to add values separated by a carriage return.
I.e : instead of Lot1Lot2Lot3, I ...
0
votes
1
answer
2k
views
How to accept revisions / track changes (ins/del) in a docx?
In MS-Word 2010 there is an Option under File -> Information to check the document for problems before sharing it. This makes it possible to handle track changes (to new newest version) and remove all ...
0
votes
1
answer
77
views
XSLT 2.0 - High Level Grouping with Sums (WordML)
Dearest Professionals,
I have some joint billing XML code that has Time Card / Timekeeper summaries within. I can easily group by a specific Matter, then by Timekeeper and get totals per matter. But ...
2
votes
1
answer
539
views
Expected behavior of the renderer for superscripts and subscripts in Word Open XML
It looks like ECMA specification for Word Open XML doesn't specify how to render "runs" with vertAlign attribute. Is there a document describing the expected behavior:
What font size to use for ...
0
votes
0
answers
323
views
Restrict <w:instrText> Field in Word OOXML
I want to put important data in "w: fldChar" tag, I tried to put that data in "w:instrText" tag, but this code can be changed by user on run time, I want to restrict this field, is their any solution ...