DOCX to PDF Batch Converter for Openclaw

Convert batches of Word DOC and DOCX files into PDFs on Windows using LibreOffice from PowerShell, without installing Microsoft Word.

zd200572
v1.0.0
Oct 10, 2026
0
66
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install docx2pdf

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install docx2pdf using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is DOCX to PDF Batch Converter?

This Openclaw Skills entry provides a practical Windows workflow for converting .doc and .docx files to PDF with LibreOffice’s soffice.exe in headless mode. Run it from PowerShell to process files in the current directory or send PDFs to a designated output folder, with no Microsoft Word installation or Office license required.

The skill focuses on reliable command-line use: it explains PowerShell path quoting and wildcard expansion, configurable LibreOffice paths, output behavior, and common conversion errors. It is well suited to one-off batches and scripts, while noting that complex Word layouts may not render identically in LibreOffice.

DOCX to PDF Batch Converter Use Cases

  • Convert dozens or hundreds of DOC/DOCX files to PDF in one batch.
  • Process Word documents on Windows machines without Microsoft Word installed.
  • Add document conversion to a PowerShell script or an automated workflow.
  • Convert only .docx files, or direct generated PDFs to a separate output folder.
  • Recursively process documents in subdirectories while keeping each PDF beside its source file.
  • Use a repeatable command-line workflow across Windows PCs without an Office license.

How DOCX to PDF Batch Converter Works

  1. Install LibreOffice and locate soffice.exe.
  2. In PowerShell, change to the folder containing the source files.
  3. Call soffice.exe with the PowerShell call operator (&), using --headless --invisible to avoid UI windows and prompts.
  4. Pass the PDF conversion option and an output directory, followed by file patterns such as *.doc and *.docx. PowerShell expands the wildcards into individual file paths before invoking LibreOffice.
  5. LibreOffice creates a PDF with the same base name for each source document. Existing PDFs with matching names are overwritten.
  6. Check the output, especially for documents with complex Word formatting. If a previous LibreOffice process is still running, stop it before retrying.

DOCX to PDF Batch Converter Setup

Requirements

  • Windows 7 or later, or Windows Server 2012 or later.
  • LibreOffice installed.
  • PowerShell 3.0 or later.
  • soffice.exe available on PATH, or its full path set through the SOFFICE environment variable. The default path used by this skill is C:\Program Files\LibreOffice\program\soffice.exe.

Convert files in the current directory

Open PowerShell in the folder containing the Word documents, then run:

& 'C:\Program Files\LibreOffice\program\soffice.exe' --headless --invisible --convert-to pdf --outdir . *.doc *.docx

For PowerShell usage, & is required to execute a quoted path containing spaces. The shell expands *.doc and *.docx; do not pass ./ or .* as an input file.

Configure a different LibreOffice path

$env:SOFFICE = 'D:\Program Files\LibreOffice\program\soffice.exe'
& $env:SOFFICE --headless --invisible --convert-to pdf --outdir . *.doc *.docx

To convert only DOCX files, remove *.doc. To write PDFs to a subfolder, create that folder first and use it as the --outdir value, for example --outdir .\pdf_out. For large batches, process files in smaller groups. If conversion reports that LibreOffice is already running, stop leftover soffice processes and retry.

DOCX to PDF Batch Converter Data Schema & Taxonomy

Inputs and outputs

Item Description
Source files .doc and .docx files in the current directory; PowerShell expands the file patterns before passing paths to LibreOffice.
Output files PDFs with the same base names as the source documents.
Output location The directory specified by --outdir; use . for the current directory.
Existing PDFs A PDF with the same name is overwritten.

Skill metadata

The skill metadata identifies the name as docx2pdf, version as 1.0.0, and license as MIT. Its tags cover Windows, LibreOffice, soffice, PDF, batch conversion, PowerShell, DOCX, and DOC. The SOFFICE configuration value can override the default executable path. This workflow does not define a separate database or structured intermediate data format; its generated artifacts are the PDF files.

DOCX to PDF Batch Converter Advanced Features

  • Custom executable path: Set SOFFICE to support non-default LibreOffice installation locations.
  • Selective conversion: Pass only *.docx when DOC files should be excluded.
  • Custom output directory: Use --outdir to keep generated PDFs separate from source documents.
  • Recursive processing: Use Get-ChildItem -Recurse -Include *.doc,*.docx and invoke LibreOffice for each file, setting the output directory to the source file’s directory.
  • Explicit PDF exporter: Use --convert-to pdf:writer_pdf_Export when explicitly selecting LibreOffice’s Writer PDF exporter.
  • Batch reliability guidance: Split batches larger than about 50 files and stop leftover soffice processes if a later run reports that LibreOffice is already running.
  • Layout caveat: Review important PDFs for fidelity. Revisions, SmartArt, embedded objects, and other complex Word features may render differently; use Word’s own PDF export when exact layout preservation is essential.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*