Page 1 of 1

Checkbox and radiobox

PostPosted: Wed Aug 01, 2012 6:50 pm
by Marco
Hi all,

I have a docx file which contains checkbox and radiobox.
I am still using sample class org.docx4j.samples.ConvertOutHtml provided in the JAR to convert into HTML.

Checkbox and radiobox are not correctly displayed in the final HTML file.

Is there a waay to get them?

Thanks
Marco

Re: Checkbox and radiobox

PostPosted: Wed Aug 01, 2012 7:55 pm
by jason
Please post an extract from your document.xml showing the markup representing these. You can surround it with xml in square brackets, for pretty formatting

Re: Checkbox and radiobox

PostPosted: Wed Aug 01, 2012 9:53 pm
by Marco
I am new to docx4j.

What is document.xml?

Re: Checkbox and radiobox

PostPosted: Wed Aug 01, 2012 10:19 pm
by jason
unzip your docx, and look for word/document.xml

Re: Checkbox and radiobox

PostPosted: Thu Aug 02, 2012 12:00 am
by Marco
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<w:document xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml">
        <w:body>
                <w:p w:rsidR="00406977" w:rsidRDefault="00AD61A2">
                        <w:pPr>
                                <w:rPr>
                                        <w:sz w:val="52"/>
                                        <w:szCs w:val="52"/>
                                        <w:u w:val="single"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r w:rsidRPr="00AD61A2">
                                <w:rPr>
                                        <w:b/>
                                        <w:sz w:val="40"/>
                                        <w:szCs w:val="40"/>
                                </w:rPr>
                                <w:t>Test</w:t>
                        </w:r>
                        <w:r>
                                <w:t xml:space="preserve">  </w:t>
                        </w:r>
                        <w:proofErr w:type="spellStart"/>
                        <w:r w:rsidRPr="00AD61A2">
                                <w:rPr>
                                        <w:color w:val="FF0000"/>
                                </w:rPr>
                                <w:t>for</w:t>
                        </w:r>
                        <w:proofErr w:type="spellEnd"/>
                        <w:r>
                                <w:t xml:space="preserve">  </w:t>
                        </w:r>
                        <w:r w:rsidRPr="00AD61A2">
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                        <w:i/>
                                </w:rPr>
                                <w:t>DOCX</w:t>
                        </w:r>
                        <w:r>
                                <w:t xml:space="preserve">  </w:t>
                        </w:r>
                        <w:proofErr w:type="spellStart"/>
                        <w:r w:rsidRPr="00AD61A2">
                                <w:rPr>
                                        <w:sz w:val="52"/>
                                        <w:szCs w:val="52"/>
                                        <w:u w:val="single"/>
                                </w:rPr>
                                <w:t>conversion</w:t>
                        </w:r>
                        <w:proofErr w:type="spellEnd"/>
                </w:p>
                <w:p w:rsidR="00AD61A2" w:rsidRDefault="007B24E8" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:numPr>
                                        <w:ilvl w:val="0"/>
                                        <w:numId w:val="1"/>
                                </w:numPr>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                                <w:t>Item 1</w:t>
                        </w:r>
                </w:p>
                <w:p w:rsidR="007B24E8" w:rsidRDefault="007B24E8" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:numPr>
                                        <w:ilvl w:val="0"/>
                                        <w:numId w:val="1"/>
                                </w:numPr>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                                <w:t>Item 2</w:t>
                        </w:r>
                </w:p>
                <w:p w:rsidR="007B24E8" w:rsidRDefault="007B24E8" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:numPr>
                                        <w:ilvl w:val="0"/>
                                        <w:numId w:val="1"/>
                                </w:numPr>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                                <w:t>Item 3</w:t>
                        </w:r>
                </w:p>
                <w:p w:rsidR="007B24E8" w:rsidRDefault="007B24E8" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:numPr>
                                        <w:ilvl w:val="0"/>
                                        <w:numId w:val="2"/>
                                </w:numPr>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                                <w:t>Element 1</w:t>
                        </w:r>
                </w:p>
                <w:p w:rsidR="007B24E8" w:rsidRDefault="007B24E8" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:numPr>
                                        <w:ilvl w:val="0"/>
                                        <w:numId w:val="2"/>
                                </w:numPr>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                                <w:t>Element 2</w:t>
                        </w:r>
                </w:p>
                <w:p w:rsidR="007B24E8" w:rsidRDefault="007B24E8" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:numPr>
                                        <w:ilvl w:val="0"/>
                                        <w:numId w:val="2"/>
                                </w:numPr>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                                <w:t>Element 3</w:t>
                        </w:r>
                </w:p>
                <w:p w:rsidR="00AD61A2" w:rsidRDefault="00AD61A2">
                        <w:pPr>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                </w:rPr>
                        </w:pPr>
                </w:p>
                <w:p w:rsidR="007B24E8" w:rsidRPr="007B24E8" w:rsidRDefault="007B24E8" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:jc w:val="right"/>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r w:rsidRPr="007B24E8">
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                                <w:t>Right Alignment</w:t>
                        </w:r>
                </w:p>
                <w:p w:rsidR="007B24E8" w:rsidRPr="007B24E8" w:rsidRDefault="007B24E8" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:jc w:val="center"/>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r w:rsidRPr="007B24E8">
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                                <w:t>Center Alignment</w:t>
                        </w:r>
                </w:p>
                <w:p w:rsidR="007B24E8" w:rsidRPr="007B24E8" w:rsidRDefault="007B24E8" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r w:rsidRPr="007B24E8">
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                                <w:t>Left Alignment</w:t>
                        </w:r>
                </w:p>
                <w:p w:rsidR="007B24E8" w:rsidRDefault="007B24E8" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:rPr>
                                        <w:rFonts w:ascii="Arial Unicode MS" w:eastAsia="Arial Unicode MS" w:hAnsi="Arial Unicode MS" w:cs="Arial Unicode MS"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                        </w:pPr>
                </w:p>
                <w:tbl>
                        <w:tblPr>
                                <w:tblW w:w="0" w:type="auto"/>
                                <w:tblBorders>
                                        <w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/>
                                        <w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>
                                        <w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/>
                                        <w:right w:val="single" w:sz="4" w:space="0" w:color="auto"/>
                                        <w:insideH w:val="single" w:sz="4" w:space="0" w:color="auto"/>
                                        <w:insideV w:val="single" w:sz="4" w:space="0" w:color="auto"/>
                                </w:tblBorders>
                                <w:tblLook w:val="04A0"/>
                        </w:tblPr>
                        <w:tblGrid>
                                <w:gridCol w:w="3070"/>
                                <w:gridCol w:w="3071"/>
                                <w:gridCol w:w="3071"/>
                        </w:tblGrid>
                        <w:tr w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidTr="00792DAE">
                                <w:tc>
                                        <w:tcPr>
                                                <w:tcW w:w="3070" w:type="dxa"/>
                                                <w:vAlign w:val="center"/>
                                        </w:tcPr>
                                        <w:p w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidRDefault="004310FD" w:rsidP="00792DAE">
                                                <w:pPr>
                                                        <w:jc w:val="center"/>
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                </w:pPr>
                                                <w:r w:rsidRPr="00792DAE">
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                        <w:t>Header 1</w:t>
                                                </w:r>
                                        </w:p>
                                </w:tc>
                                <w:tc>
                                        <w:tcPr>
                                                <w:tcW w:w="3071" w:type="dxa"/>
                                                <w:vAlign w:val="center"/>
                                        </w:tcPr>
                                        <w:p w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidRDefault="004310FD" w:rsidP="00792DAE">
                                                <w:pPr>
                                                        <w:jc w:val="center"/>
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                </w:pPr>
                                                <w:r w:rsidRPr="00792DAE">
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                        <w:t>Header 2</w:t>
                                                </w:r>
                                        </w:p>
                                </w:tc>
                                <w:tc>
                                        <w:tcPr>
                                                <w:tcW w:w="3071" w:type="dxa"/>
                                                <w:vAlign w:val="center"/>
                                        </w:tcPr>
                                        <w:p w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidRDefault="004310FD" w:rsidP="00792DAE">
                                                <w:pPr>
                                                        <w:jc w:val="center"/>
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                </w:pPr>
                                                <w:r w:rsidRPr="00792DAE">
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                        <w:t>Header 3</w:t>
                                                </w:r>
                                        </w:p>
                                </w:tc>
                        </w:tr>
                        <w:tr w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidTr="00792DAE">
                                <w:tc>
                                        <w:tcPr>
                                                <w:tcW w:w="3070" w:type="dxa"/>
                                        </w:tcPr>
                                        <w:p w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidRDefault="00792DAE" w:rsidP="00792DAE">
                                                <w:pPr>
                                                        <w:jc w:val="center"/>
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                </w:pPr>
                                                <w:r w:rsidRPr="00792DAE">
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                        <w:t>Item 1</w:t>
                                                </w:r>
                                        </w:p>
                                </w:tc>
                                <w:tc>
                                        <w:tcPr>
                                                <w:tcW w:w="3071" w:type="dxa"/>
                                        </w:tcPr>
                                        <w:p w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidRDefault="00792DAE" w:rsidP="00792DAE">
                                                <w:pPr>
                                                        <w:jc w:val="center"/>
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                </w:pPr>
                                                <w:r w:rsidRPr="00792DAE">
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                        <w:t>Item 2</w:t>
                                                </w:r>
                                        </w:p>
                                </w:tc>
                                <w:tc>
                                        <w:tcPr>
                                                <w:tcW w:w="3071" w:type="dxa"/>
                                        </w:tcPr>
                                        <w:p w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidRDefault="00792DAE" w:rsidP="00792DAE">
                                                <w:pPr>
                                                        <w:jc w:val="center"/>
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                </w:pPr>
                                                <w:r w:rsidRPr="00792DAE">
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                        <w:t>Item 3</w:t>
                                                </w:r>
                                        </w:p>
                                </w:tc>
                        </w:tr>
                        <w:tr w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidTr="00792DAE">
                                <w:tc>
                                        <w:tcPr>
                                                <w:tcW w:w="3070" w:type="dxa"/>
                                        </w:tcPr>
                                        <w:p w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidRDefault="00792DAE" w:rsidP="00792DAE">
                                                <w:pPr>
                                                        <w:jc w:val="center"/>
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                </w:pPr>
                                                <w:r w:rsidRPr="00792DAE">
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                        <w:t>Item 4</w:t>
                                                </w:r>
                                        </w:p>
                                </w:tc>
                                <w:tc>
                                        <w:tcPr>
                                                <w:tcW w:w="3071" w:type="dxa"/>
                                        </w:tcPr>
                                        <w:p w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidRDefault="00792DAE" w:rsidP="00792DAE">
                                                <w:pPr>
                                                        <w:jc w:val="center"/>
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                </w:pPr>
                                                <w:r w:rsidRPr="00792DAE">
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                        <w:t>Item 5</w:t>
                                                </w:r>
                                        </w:p>
                                </w:tc>
                                <w:tc>
                                        <w:tcPr>
                                                <w:tcW w:w="3071" w:type="dxa"/>
                                        </w:tcPr>
                                        <w:p w:rsidR="004310FD" w:rsidRPr="00792DAE" w:rsidRDefault="00792DAE" w:rsidP="00792DAE">
                                                <w:pPr>
                                                        <w:jc w:val="center"/>
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                </w:pPr>
                                                <w:r w:rsidRPr="00792DAE">
                                                        <w:rPr>
                                                                <w:lang w:val="en-US"/>
                                                        </w:rPr>
                                                        <w:t>Item 6</w:t>
                                                </w:r>
                                        </w:p>
                                </w:tc>
                        </w:tr>
                </w:tbl>
                <w:p w:rsidR="007B24E8" w:rsidRDefault="007B24E8" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                        </w:pPr>
                </w:p>
                <w:p w:rsidR="00F80923" w:rsidRDefault="00090EF0" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                                <w:fldChar w:fldCharType="begin">
                                        <w:ffData>
                                                <w:name w:val="Kontrollkästchen1"/>
                                                <w:enabled/>
                                                <w:calcOnExit w:val="0"/>
                                                <w:checkBox>
                                                        <w:sizeAuto/>
                                                        <w:default w:val="0"/>
                                                </w:checkBox>
                                        </w:ffData>
                                </w:fldChar>
                        </w:r>
                        <w:bookmarkStart w:id="0" w:name="Kontrollkästchen1"/>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                                <w:instrText xml:space="preserve"> FORMCHECKBOX </w:instrText>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                                <w:fldChar w:fldCharType="end"/>
                        </w:r>
                        <w:bookmarkEnd w:id="0"/>
                </w:p>
                <w:p w:rsidR="00090EF0" w:rsidRDefault="00511DF9" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                                <w:object w:dxaOrig="1440" w:dyaOrig="1440">
                                        <v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
                                                <v:stroke joinstyle="miter"/>
                                                <v:formulas>
                                                        <v:f eqn="if lineDrawn pixelLineWidth 0"/>
                                                        <v:f eqn="sum @0 1 0"/>
                                                        <v:f eqn="sum 0 0 @1"/>
                                                        <v:f eqn="prod @2 1 2"/>
                                                        <v:f eqn="prod @3 21600 pixelWidth"/>
                                                        <v:f eqn="prod @3 21600 pixelHeight"/>
                                                        <v:f eqn="sum @0 0 1"/>
                                                        <v:f eqn="prod @6 1 2"/>
                                                        <v:f eqn="prod @7 21600 pixelWidth"/>
                                                        <v:f eqn="sum @8 21600 0"/>
                                                        <v:f eqn="prod @7 21600 pixelHeight"/>
                                                        <v:f eqn="sum @10 21600 0"/>
                                                </v:formulas>
                                                <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
                                                <o:lock v:ext="edit" aspectratio="t"/>
                                        </v:shapetype>
                                        <v:shape id="_x0000_i1027" type="#_x0000_t75" style="width:108pt;height:21pt" o:ole="">
                                                <v:imagedata r:id="rId6" o:title=""/>
                                        </v:shape>
                                        <w:control r:id="rId7" w:name="OptionButton1" w:shapeid="_x0000_i1027"/>
                                </w:object>
                        </w:r>
                </w:p>
                <w:bookmarkStart w:id="1" w:name="Kontrollkästchen2"/>
                <w:p w:rsidR="00090EF0" w:rsidRPr="00090EF0" w:rsidRDefault="0031316E" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                                <w:fldChar w:fldCharType="begin">
                                        <w:ffData>
                                                <w:name w:val="Kontrollkästchen2"/>
                                                <w:enabled/>
                                                <w:calcOnExit w:val="0"/>
                                                <w:checkBox>
                                                        <w:sizeAuto/>
                                                        <w:default w:val="1"/>
                                                </w:checkBox>
                                        </w:ffData>
                                </w:fldChar>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                                <w:instrText xml:space="preserve"> FORMCHECKBOX </w:instrText>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                        <w:lang w:val="en-US"/>
                                </w:rPr>
                                <w:fldChar w:fldCharType="end"/>
                        </w:r>
                        <w:bookmarkEnd w:id="1"/>
                </w:p>
                <w:p w:rsidR="00F80923" w:rsidRDefault="00F80923" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                </w:rPr>
                        </w:pPr>
                </w:p>
                <w:p w:rsidR="00090EF0" w:rsidRPr="00090EF0" w:rsidRDefault="00090EF0" w:rsidP="007B24E8">
                        <w:pPr>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                </w:rPr>
                        </w:pPr>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                </w:rPr>
                                <w:fldChar w:fldCharType="begin">
                                        <w:ffData>
                                                <w:name w:val="Text1"/>
                                                <w:enabled/>
                                                <w:calcOnExit w:val="0"/>
                                                <w:textInput/>
                                        </w:ffData>
                                </w:fldChar>
                        </w:r>
                        <w:bookmarkStart w:id="2" w:name="Text1"/>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                </w:rPr>
                                <w:instrText xml:space="preserve"> FORMTEXT </w:instrText>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                </w:rPr>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                </w:rPr>
                                <w:fldChar w:fldCharType="separate"/>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:noProof/>
                                        <w:u w:val="single"/>
                                </w:rPr>
                                <w:t></w:t>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:noProof/>
                                        <w:u w:val="single"/>
                                </w:rPr>
                                <w:t></w:t>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:noProof/>
                                        <w:u w:val="single"/>
                                </w:rPr>
                                <w:t></w:t>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:noProof/>
                                        <w:u w:val="single"/>
                                </w:rPr>
                                <w:t></w:t>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:noProof/>
                                        <w:u w:val="single"/>
                                </w:rPr>
                                <w:t></w:t>
                        </w:r>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                </w:rPr>
                                <w:fldChar w:fldCharType="end"/>
                        </w:r>
                        <w:bookmarkEnd w:id="2"/>
                        <w:r>
                                <w:rPr>
                                        <w:u w:val="single"/>
                                </w:rPr>
                                <w:t xml:space="preserve"> </w:t>
                        </w:r>
                </w:p>
                <w:sectPr w:rsidR="00090EF0" w:rsidRPr="00090EF0" w:rsidSect="00406977">
                        <w:pgSz w:w="11906" w:h="16838"/>
                        <w:pgMar w:top="1417" w:right="1417" w:bottom="1134" w:left="1417" w:header="708" w:footer="708" w:gutter="0"/>
                        <w:cols w:space="708"/>
                        <w:docGrid w:linePitch="360"/>
                </w:sectPr>
        </w:body>
</w:document>

 
Parsed in 0.056 seconds, using GeSHi 1.0.8.4

Re: Checkbox and radiobox

PostPosted: Thu Aug 02, 2012 12:49 am
by jason
So the checkbox is a Word field:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
<w:instrText xml:space="preserve"> FORMCHECKBOX </w:instrText>
 
Parsed in 0.000 seconds, using GeSHi 1.0.8.4


and the radio button is VML:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
                                <w:object w:dxaOrig="1440" w:dyaOrig="1440">
                                        <v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
                                                <v:stroke joinstyle="miter"/>
                                                <v:formulas>
                                                        <v:f eqn="if lineDrawn pixelLineWidth 0"/>
                                                        <v:f eqn="sum @0 1 0"/>
                                                        <v:f eqn="sum 0 0 @1"/>
                                                        <v:f eqn="prod @2 1 2"/>
                                                        <v:f eqn="prod @3 21600 pixelWidth"/>
                                                        <v:f eqn="prod @3 21600 pixelHeight"/>
                                                        <v:f eqn="sum @0 0 1"/>
                                                        <v:f eqn="prod @6 1 2"/>
                                                        <v:f eqn="prod @7 21600 pixelWidth"/>
                                                        <v:f eqn="sum @8 21600 0"/>
                                                        <v:f eqn="prod @7 21600 pixelHeight"/>
                                                        <v:f eqn="sum @10 21600 0"/>
                                                </v:formulas>
                                                <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
                                                <o:lock v:ext="edit" aspectratio="t"/>
                                        </v:shapetype>
                                        <v:shape id="_x0000_i1027" type="#_x0000_t75" style="width:108pt;height:21pt" o:ole="">
                                                <v:imagedata r:id="rId6" o:title=""/>
                                        </v:shape>
                                        <w:control r:id="rId7" w:name="OptionButton1" w:shapeid="_x0000_i1027"/>
                                </w:object>
 
Parsed in 0.003 seconds, using GeSHi 1.0.8.4


Obviously the HTML output doesn't support either of these at present, but it would be possible to add. In the case of the VML, I guess you look up the control using the relId, and detect that the ActiveX object is a radio button.

I'm afraid you'll have to implement this yourself, or get someone else to help, if you want it done any time soon.

Re: Checkbox and radiobox

PostPosted: Thu Aug 02, 2012 1:06 am
by Marco
What is a VML?

But is there a way to have a checkboy or radiobox converted into HTML starting from Word?

I am also interested in text fields.

Re: Checkbox and radiobox

PostPosted: Thu Aug 02, 2012 1:20 am
by Marco
Ok, VML stands for Vector Markup Language, right?

What I did is simply inserting a radio button and a checkbox, why are they different elements?

In any case, are there different types of radio buttons, for example?

Re: Checkbox and radiobox

PostPosted: Thu Aug 02, 2012 8:47 am
by jason
These two things represent different generation legacy technologies (that's why they are in Word's Developer > Legacy Tools)

Word 2003 used to have HTML forms tools, and you could save an HTML form. They took that out in 2007, I think because they want you to use Infopath instead.

Re: Checkbox and radiobox

PostPosted: Thu Aug 02, 2012 4:38 pm
by jason
Of passing interest perhaps, is that Microsoft's US patent 5,552,982 on Word fields has as one of its inventors, none other than William H Gates III himself!

Re: Checkbox and radiobox

PostPosted: Wed Aug 15, 2012 6:00 pm
by Marco
Ok, thanks.
So, at this moment, there is now way to convert radio buttons / check-box / text field into HTML using docx4j, right?

Re: Checkbox and radiobox

PostPosted: Wed Aug 15, 2012 6:57 pm
by jason
Right. As I said earlier:

jason wrote:Obviously the HTML output doesn't support either of these at present, but it would be possible to add. In the case of the VML, I guess you look up the control using the relId, and detect that the ActiveX object is a radio button.

Re: Checkbox and radiobox

PostPosted: Wed Aug 15, 2012 7:34 pm
by Marco
You mean:

Code: Select all
<w:control r:id="rId9" w:name="OptionButton1" w:shapeid="_x0000_i1040"/>

Re: Checkbox and radiobox

PostPosted: Wed Aug 15, 2012 8:29 pm
by jason
Yep, maybe its enough to detect the presence of @w:name="OptionButton1"