Questions tagged [docx]

.docx is the file extension for files created using the default format of Microsoft Word 2007 or higher. Use this tag when you are working with .docx files programmatically, such as generating .docx, extracting data from .docx or editing a .docx

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

How to determine if a paragraph has indentation in doc file when parsing the file using mammoth?

How to determine if a paragraph has indentation in doc file when parsing the file using mammoth? PS: I need to add a custom class using style maps on the indented element so that I can add my custom ...
Rishabh Singh's user avatar
1 vote
1 answer
17 views

I tried to copy everything from my word document but kept losing the content in the tables

I wanted to duplicate the SAMPLE files many times to output.docx. I'm still on the step of copying it once. It pastes the fonts, formats, and tables, but the content in the tables are gone. Also I ...
GiantMind's user avatar
0 votes
0 answers
16 views

PhpWord convert html to docx heading not parsed well

I'm trying to convert HTML into a docx file using PhpWord, and I get the html headings (h1, h2, h3 ..) as simple texts in the result file: ⚠️ font size the same as a paragraph ⚠️ font weight not bold ...
toihirhalim's user avatar
0 votes
0 answers
41 views

Which file format keeps as much information as possible when converted from docx while being easily editable in vim? [closed]

Logos is a Bible study software that allows you do upload your own personal books (https://support.logos.com/hc/en-us/articles/360015926452-Personal-Books), but it requires them in the docx format ...
Sweenu's user avatar
  • 1
-1 votes
0 answers
14 views

Is there any method suitable for converting word to pdf on linux systems?

Is there any method suitable for converting word to pdf on linux systems? (Preferably software that can be used directly via python, or command line invocations.) I've used Libreoffice, but it doesn't ...
GeorgeWu's user avatar
1 vote
1 answer
28 views

Avoid unwanted LF linefeeds in PanDoc docx to markdown conversion

I need to convert a PDF document to markdown. Because PanDoc doesn't support PDF as an input format, I use MS Word's online conversion. The result in Word looks like this: As you can see, there's a ...
Richard Kranendonk's user avatar
-1 votes
0 answers
12 views

Huge docx due to large images

Sometimes I get large word docx files with multiple images and unfortunately with full resolution, which is normally useless, especially if these are some black and white "scans" of some ...
harmi22's user avatar
  • 39
0 votes
1 answer
52 views

Error while merging docx files into single pdf using google apps script

I used a Google Apps script code proposed by Tanaike to merge multiple PDF files into one. My requirements are: Get file id Check if it is pdf or docx If it is docx, convert it into pdf and then ...
EagleEye's user avatar
  • 282
0 votes
0 answers
11 views

Is any way to insert text box in python-docx?

I have a predefined DOCX document that contains text boxes. I want to update the text within these text boxes, or if someone suggests, replace the text box with my desired content. Is it possible to ...
Shekhar Dipankar's user avatar
1 vote
1 answer
50 views

Getting CSS selector error while integrating PSPSDF library in my angular application

I need to preview a docx in existing URL, as previewing docx type on the browser is not supported by the browser defaultly. I choose to go with this library. <div class="pdf-viewer"> ...
Prajwal Pandey's user avatar
0 votes
0 answers
31 views

Editing word text box with python

I have the following problem: I am trying to edit a word document using python. I am able to change a placeholder to the desired text when it is in paragraph form, but I can't edit the place holder in ...
Tdog's user avatar
  • 21
0 votes
0 answers
38 views

Problem with Docx editor within my web app(seeking high flexibilitty) / Google Docs API getter that returns a position of user's cursor?

I have an app focused on automation of administrative processes. It works thanks to docx templates mapped to some fields inside my db. Example: Mapped document: Dear {client.firstName} {client....
Daniel Klimek's user avatar
0 votes
0 answers
21 views

how can i troubleshoot problems with import docx

import : The term 'import' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is ...
Feni Timothy's user avatar
0 votes
1 answer
33 views

when i convert docx to pdf its losing the style

when i convert docx file to pdf file its converted but without style and the arabic letters its becomes like '????' here is the code : public function attr(Request $request) { /* Set the PDF ...
NOURDDINE BENYAHYA's user avatar
0 votes
0 answers
43 views

PyInstaller ModuleNotFoundError for 'docx' Despite Using --hidden-import

I want to be able to run my Python script on Windows simply by double-clicking on an executable file, without needing to install Python or other libraries first. I'm trying to create a standalone ...
Sir. wolf's user avatar
0 votes
0 answers
30 views

Converting html location to docx with ReactJS

I'm designing an editable place on the website and those textboxes are for the next user to fill in information. enter image description here Currently I am using coordinates to save the position of ...
Thành Hồ Tấn's user avatar
0 votes
0 answers
54 views

Transferring a mathtype formula to a new docx file

I use the python-docx library to format articles There is a problem with formulas in the MathType format; it is not possible to transfer them to a new formatted file. I tried using this code: doc = ...
Dovin Baan's user avatar
0 votes
1 answer
25 views

Why am I unable to use my custom-reference.docx when converting md to docx with Pandoc?

I'm trying to convert markdown to a docx file with Pandoc using a custom reference doc. I created a reference doc according to the Pandoc manual and placed it in my .pandoc folder. Here's a mwe of the ...
jonathan's user avatar
-1 votes
0 answers
33 views

REACT NATIVE how to extract text from both doc and docx files i tried some npm but they do not support DOC FILES

REACT NATIVE how to extract text from both doc and docx files i tried some npm but they do not support DOC FILES DOES SOMEBODY KNOW OF A NPM PACKAGE THAT WORKS WITH REACT NATIVE AND CAN TRANSFORN BOTH ...
john's user avatar
  • 1
0 votes
1 answer
32 views

Laravel + Vue.js - downloaded docx file is corrupted

I use Laravel 10.x and Vue.js 3.x with PHPWord package for my project. I would like to download a generated docx file. The download is successful, but I cannot open the file - it is corrupted. I have ...
E R's user avatar
  • 1
0 votes
0 answers
44 views

Nullpointer Exception when converting DOCX to PDF using Docx4j with non-XSL transformation

I am fairly new to Docx4j library. I'm trying to convert a DOCX file to PDF using the Docx4j library and I want to use the non-XSL transformation method (Docx4J.FLAG_EXPORT_PREFER_NONXSL) to reduce ...
New2Java's user avatar
  • 283
0 votes
1 answer
32 views

Extracting numbered lists from docx documents as they appear in the document (python 3.X)

I have .docx documents that I need to parse, extracting numbered lists as they appear in the document. For example: However, different approaches have not resulted in anything. What I've tried so far:...
Dion's user avatar
  • 222
0 votes
1 answer
51 views

Mass editing (find and replace) docx files and its footer and header with Powershell

I am trying to create a script using Powershell to mass edit docx files in a folder. I am trying to have them replace a string "154" to "12" in this case. It works, except it won't ...
Siim Bachmann's user avatar
0 votes
1 answer
49 views

Show a text in a box in Word by POI

I want to show a text in Word inside a box using Apache POI XWPF like this: This example was done in Word using a shape with a text inside the shape. But I am not able to do this correctly in Word ...
Hervé Girod's user avatar
0 votes
0 answers
5 views

How can I automate a process where I compare 2 nearly identical docx files, extract the links and link destination and apply to a the other docx file?

i need to exchange the hyperlink page number values in one file for the corresponding location in another file with almost identical text, without having to search for the destination location of ...
Meghan Slappey's user avatar
0 votes
0 answers
13 views

How to completely fill a cell with a picture in a docx file using Python

How do I use the entire space in a cell so that a picture fully covers it? I am trying to do this with Python in docx format. I have tried the following, but it results in an error: chart_cell = ...
techDesign's user avatar
0 votes
1 answer
82 views

Python-docx Copy column

I'd like to copy column from a table to another. Is there any way to do it? I've tried the following code, but the column is not copied. from docx import Document doc = Document('document.docx') ...
Jackp's user avatar
  • 3
0 votes
0 answers
50 views

How can I resolve this issue and convert the DOCX file from the PDF Using LibreOffice in PHP?

I encountered the following error when running the below code: Array ( [0] => Error: no export filter for /home/nigsys.net/public_html/123.docx found, aborting. [1] => Error: no export filter ) ...
NigSys Technologies's user avatar
-1 votes
1 answer
44 views

How do I make multicolor text in the same line in word using Apache PO in JavaI?

I need to generate a word document using Apache POI that has multiple colors of text in one single line and then ends with a horizontal line break. Like in the example bellow: What I want I tried to ...
just_dodge_lmao's user avatar
0 votes
0 answers
27 views

Display Matrix in Quarto for docx rendering

I've been trying to displayed an equation in Quarto in the form of matrix and rendering it to docx, but I found difficulty on it. From multiple sources, the matrix (3x3) code represented as \matrix(@@&...
Muhammad Ihsan's user avatar
0 votes
0 answers
50 views

Extract info from this data structure? [duplicate]

I'm using crate docx_rs to extract text from an MS Word file. I don't understand how this fits together and why the following match statement is not working as I'd hoped: let docx = &read_docx(&...
mike rodent's user avatar
  • 14.4k
0 votes
1 answer
62 views

Extract text from Word document and store in an excel file using python

I have a word document that is a standard template used for our wider meetings. There are two columns in my word document, First Column has all the headers second column holds the actual details of ...
Django0602's user avatar
0 votes
1 answer
66 views

How can I write a MERGEFIELD into a word document?

I want to be able to create a word document, filled with MERGEFIELDS, based on a dictionary in Python. So when the item is called 'example', I want to have a word document that contains { MERGEFIELD ...
Max van der Weide's user avatar
0 votes
0 answers
75 views

DOCX to PDF works after saving file only [JAVA]

The code provided bellow kinda works, the problemn i'm trying to solve is that i'm already able to save my docx localy. When im trying to covert it to pdf, i get blank pages or pages with only the ...
Bruno RB's user avatar
0 votes
0 answers
24 views

How to delete all comments in docx file with OpenXML Powertools

I cannot find an example of how to delete all comments using OpenXML Powertools. Is this functionality included similar to the acceptrevisions or does it require a custom implementation? I am ...
Irish Redneck's user avatar
0 votes
0 answers
12 views

Parsing docx with SwiftSoup and SSZipArchive yields unexpected results due to "gramstart" tag

I retrieve a docx via a web service call. I then unzip it with SSZipArchive. From there, I parse it with SwiftSoup. See code below if let xmlURL = self.extractDocxAttachment(data: data) { ...
Moses Harding's user avatar
0 votes
0 answers
29 views

Add image to word document in Expo react native with doc.js

I would like to add an image in a Word document using docx.js and I was following this example, but it has failed. below is my code. const generateFromUrl = async () => { const blob = await axios( ...
Kulaba Brian Austin's user avatar
0 votes
0 answers
12 views

docx Property 'addSection' is private and only accessible within class 'File'

const versionList = Object.keys(releaseNote) for (const key of versionList) { // Skip the version if none of its release notes are selected for cherry-picking. const shouldInclude = cherryPick[key]....
KoyOutkarm's user avatar
1 vote
1 answer
49 views

how to add a page break in a docx

I would like to add a page break to the pages of my word document so that each statement and its elements are all on the same page. Here is an example of an unmodified document: The behavior I would ...
lar12asra_'s user avatar
0 votes
0 answers
33 views

Is it possible to add hyperlinks to bookmarks with python docx that work when converted to pdf

I am trying to create a report, first in word, then later as a pdf, that has summary data on the first page and then create links to the detail later in the document. My plan is to create bookmarks ...
Ian.m.r.g's user avatar
0 votes
1 answer
30 views

I am getting `Error creating DOCX from AsciiDoc file` in IntelliJ Idea, How can this be resolved?

I am getting below error in IntelliJ Idea while trying to convert my .adoc file to docx using Official AsciiDoc Plugin. However, converting to pdf is working fine. Error creating DOCX from AsciiDoc ...
Awatansa Vishwakarma's user avatar
0 votes
1 answer
37 views

Looping through list to compare bulk .docx files using aspose.words python

I am attempting to bulk compare .docx files using aspose.words. I have a list that I plan on autogenerating by scanning file names. I then split that list into two lists, new docs and old docs. I then ...
Connor Davidson's user avatar
1 vote
0 answers
30 views

python docx can't render img issue

I am using python docx for splitting doc file. But there is an issue. In original doc there is an image. When split is done, this image on it's place, with required shape, but with title: "Can't ...
Georgii's user avatar
  • 11
0 votes
0 answers
43 views

React docx preview file with react-to-print problem

I am using docx-preview for Word files (doc,docx) preview on React. And user can print it. For printing I am using react-to-print. The problem is there. Some pages are cutting for not real font size (...
Rahil Əliyev's user avatar
0 votes
0 answers
26 views

How to set my own image as a thumbnail for a word document in c# code?

I'm trying to write a C# app that cycles through all of the docx and PDF files in a specific directory or directories, extract the first image it finds and set it as the new thumbnail image. There are ...
Nick Posey's user avatar
0 votes
0 answers
36 views

Why are my LaTeX block-quotes not being formatted by Pandoc?

I am trying to format my thesis which I have written in LaTeX, but I cannot get Pandoc to pass my block-quotes through correctly. Here is my minimal example: \documentclass[12pt]{article} \...
Dan Fleming's user avatar
-1 votes
2 answers
83 views

Why does Python not correctly identify the italic font in docx files?

I use Python to detect all Italic Fonts from a docx file. The problem: is doesn't find all the Italic Fonts, just some of them. For example in bebe.docx I have the next 4 lines, all have Italic Font. ...
Hellena Crainicu's user avatar
0 votes
1 answer
44 views

Python docx - How to substract the text from word form between strings

I am trying to read a form from word file and substract a specific string as path and create a directory. But I have error message while searching the target string. import docx path = 'C:/new/form....
Elif Y's user avatar
  • 253
0 votes
0 answers
47 views

How to print page content to next page after reaching page size in html-docx-js?

when trying to add a page break in html-docx-js using inline style css property it does not work. inline style css for page break doesn't seem to work. <br style="page-break-before: always; ...
Kartik Gupta's user avatar
0 votes
1 answer
83 views

Converting a word document from docs to HTML on ASP.NET Core backend and return to frontend

I have a Vue frontend that sends an API request from the front end to the backend to query MS Graph API to pull a word document from OneDrive. I need this document to be converted to HTML so I can ...
Irish Redneck's user avatar

1
2 3 4 5
61