Ask Your Question

Docx generated using content control not compatible with libre office [closed]

asked 2012-09-24 17:19:32 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello I have a document generating api in C# that fills the word template created using content controls. (literal, pics and altchunk). The api used is open office xml sdk 2.0. It works fine when i open in ms word 2007+. However it doesn't display any content controls text when opened in libre office. I am using libreoffice to convert word document to pdf.

Any idea what can be done to fix this issue?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-11-02 03:58:27.832612

4 Answers

Sort by » oldest newest most voted

answered 2013-02-27 15:37:39 +0200

AkosLukacs gravatar image

updated 2013-02-28 10:58:56 +0200

Don't know the answer, but here are some details: You can use databinding to add actual value to placeholder elements. LibreOffice only displays the databindable element's placeholder text.

Here is an article about how to do it.

And here is a sample docx: ContentControls.docx.odt (it is a docx, ignore the extension. Just can't upload files with docx extension for some reason) that contains a content control. Word shows "data from databinding", as set in the data-source xml, but libreoffice (checked with only shows the placeholder text.

The data used for databinding, if someone doesn't have that Content Control Toolkit:

  <something>data from databinding</something>

The element in the document:

    <w:dataBinding w:xpath="/root[1]/something[1]" w:storeItemID="{4eca48a1-5a98-425b-a2ec-98e9f57ae606}" />
    <w:alias w:val="titleOfFirstElement" />
    <w:tag w:val="tagOfFirstElement" />
    <w:id w:val="-1614272614" />
      <w:docPart w:val="DefaultPlaceholder_1082065158" />
    <w:p w:rsidR="00570B6E" w:rsidRDefault="00570B6E">
        <w:t>placeholder text</w:t>
edit flag offensive delete link more


@AkosLukacs -- You should now have enough karma to upload files :-)

qubit gravatar imagequbit ( 2013-02-27 17:51:22 +0200 )edit

@qubit - thanks.

AkosLukacs gravatar imageAkosLukacs ( 2013-02-28 10:59:23 +0200 )edit

@AkosLukacs -- Regarding DOCX upload, see fdo#52553 - ASKLIBREOFFICE Allowed filetypes for upload too restrictive.

qubit gravatar imagequbit ( 2013-02-28 14:52:03 +0200 )edit

answered 2013-06-19 19:12:15 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I have a simple text "my name is jack Thomas" in ms word. If you view in libre office writer it wont display "jack Thomas" The text jack Thomas is databound to xml in content control placeholder.

How do I get this document to view correctly in libreoffice. Sorry I cannot attach the document as it needs karma > 3.

Here are the steps 1) Open blank word document in 2007+. 2) Add content control placeholder 3) Go to content control tool kit and map content control with text 4) Open word document to verify that the text is there.

edit flag offensive delete link more


You should have enough karma now. Please attach your example for others to verify in Writer.

oweng gravatar imageoweng ( 2013-06-20 02:01:19 +0200 )edit

answered 2013-01-24 07:23:00 +0200

qubit gravatar image

Hi @mac,

It's a little unclear to me what you're doing in C# -- are you generating a template file, or just filling in a template file? You mention your API as 'open office xml sdk 2.0', but your title suggest that you're using Microsoft's .docx format. Do you mean 'Office Open XML' instead?

In any case, if you could upload a copy of the files you're working with, that would be most helpful. We can take a look at how the files render under LO as well as MS-Office.

edit flag offensive delete link more

answered 2012-10-15 16:17:54 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I will appreciate if someone reply to this?

edit flag offensive delete link more

Question Tools


Asked: 2012-09-24 17:19:32 +0200

Seen: 2,326 times

Last updated: Jun 19 '13