docx

ColdFusion & Java (docx4j library)

爷,独闯天下 提交于 2019-12-12 20:05:02
问题 I need to do docx manipulation (find/replace on placeholders and checking/unchecking checkboxes). Since ColdFusion 10 integrates well with Java, I decided to try and use the Java library docx4j, which basically mimics the OpenXML SDK (.net platform). I have the docx4j JAR inside a custom folder, which I have setup in my Application.cfc via JavaSettings (new in CF10, and I tried it with other JARS and it works): <cfcomponent output="false"> <cfset this.javaSettings = {LoadPaths = ["/myJava/lib

PHP OOXML Libraries? [closed]

江枫思渺然 提交于 2019-12-12 18:52:16
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . A customer is asking me to build a module for his running webapp that can load docx files and extract data based on the Headings found in the document. I know docx is just a zip file and most of what I need can be found in word/document.xml, though I'm not looking forward to parsing lists/styles/images/tables

adding images to openxml doc created from altchunk

蓝咒 提交于 2019-12-12 16:26:58
问题 I need an automated process for creating docx files from xhtml source. The xhtml files contain images ( <img> elements) whose "src" attributes point to an external reference. But the docx files need to be readable without a network connection, so I need to find a way to embed the images directly into the docx package (namely, in the /media folder). So far I've used the altChunk method (as described by Eric White) to create the .docx file. I had hoped to use the OpenXML SDK to insert the image

Any way to tell if an arbitrary .docx file is in the Strict Office Open XML format vs. the Transitional format? (ECMA-376)

蹲街弑〆低调 提交于 2019-12-12 15:17:26
问题 I've searched around the web, and haven't found any procedure or tool that can distinguish those .docx files that are encoded as Strict ECMA-376 and those that are not. (same drill for .xlsx files) Most discussions center on which formats are supported by a given app, e.g. LibreOffice, but not how to distinguish files. Dovetail question: 2. Does anyone know of any documentation that lays out the differences in the four editions of ECMA-376? http://www.ecma-international.org/publications

How can I control table column width in Word documents using DocX?

十年热恋 提交于 2019-12-12 13:53:12
问题 I am trying to recreate a table like this: I am using the DocX library to manipulate Word files, but I'm having trouble getting the widths right. Trying to set the widths of cells only seems to work when it's not set to the window autofit mode, and it only seems to resize when the specified width is greater than half of the table width, or rather, I can make a cell bigger than half the width but not smaller. What would be the simplest way to reproduce the intended table? 回答1: I found the

Exception in thread “AWT-EventQueue-0” java.lang.NoClassDefFoundError

情到浓时终转凉″ 提交于 2019-12-12 13:38:10
问题 I am trying to read a .docx file into a JTextPane , but its giving some exception. I am using POI library. What should I do? Help me out, please. Here is my code: file = new File( "C:\\Users\\Siddique Ansari\\Documents\\CV Parser\\Siddique_Resume.docx"); FileInputStream fis=new FileInputStream(file.getAbsolutePath()); XWPFDocument document=new XWPFDocument(fis);// line no 549 extractor = new XWPFWordExtractor(document); String fileData = extractor.getText(); Document doc = jTextPane1

Office Open XML bullet list

ε祈祈猫儿з 提交于 2019-12-12 12:15:00
问题 I'm trying to create a office open xml document with a bullet list in it. But instead of showing the bullets, the document shows a numbered list. This is what I look for: Paragraph 1 Paragraph 2 And instead I get the following list: Paragraph 1 Paragraph 2 I already deeply digged the Web and Googled a lot. I read the documentation from http://officeopenxml.com/anatomyofOOXML.php and from the following resources: https://msdn.microsoft.com/en-us/library/ee922775(office.14).aspx https://msdn

how to convert HTML to .docx using docx4j? [closed]

早过忘川 提交于 2019-12-12 11:32:22
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I read some articles about the conversion of html to .docx and I found out that docx4j gives pretty decent results. I wonder if anyone could provide me the following info: Needed jars and versions. Sample code for conversion from html to .docx . Sorry I couldn't post anything I tried because I haven't tried

How to generate RSID attributes correctly in Word .docx files using Apache POI?

只愿长相守 提交于 2019-12-12 10:46:29
问题 I have been using Apache POI to manipulate Microsoft Word .docx files — ie open a document that was originally created in Microsoft Word, modify it, save it to a new document. I notice that new paragraphs created by Apache POI are missing a Revision Save ID , often known as an RSID or rsidR . This is used by Word to identify changes made to a document in one session, say between saves. It is optional — users could turn it off in Microsoft Word if they want — but in reality almost everyone has

python docx set table cell background and text color

試著忘記壹切 提交于 2019-12-12 10:37:16
问题 I am using python 2.7 with docx and I would like to change the background and text color of cells in my table based on condition. I could not find any usefull resources about single cell formatting Any suggestions? Edit 1 my code style_footer = "DarkList" style_red = "ColorfulList" style_yellow = "LightShading" style_green = "MediumShading2-Accent6" style_transperent = "TableNormal" for a,rec in enumerate(data): #V headinh se piše prvo polje iz table heada document.add_heading(rec['tableHead'