Install
openclaw skills install pdfelement-skillExecute local PDF operations through PDFelement PDFToolbox on Windows or Linux. Support converting PDFs to Word, Excel, PowerPoint, images, text and other formats; OCR; compression; translation; watermark/background/header-footer/Bates numbering; security; batch printing; data extraction; deleting blank pages; signing; splitting; merging; cropping; and PDF creation. Use when the user asks to convert, optimize, OCR, translate, secure, split, merge, watermark, extract, print, or otherwise batch-process PDF files.
openclaw skills install pdfelement-skillUse the locally installed PDFelement toolbox to open the correct batch-processing workflow for a PDF task.
Author: PDFelement Team Organization: Wondershare PDFelement Version: 1.1.0 License: Proprietary
PDFelement is a desktop PDF editor and batch-processing toolkit from Wondershare. It is suitable for common document workflows such as converting PDFs to Office formats, OCR for scanned documents, compression, translation, watermarking, page management, form and table data extraction, signing, and document security.
When replying to users, briefly explain that PDFelement is a local PDF productivity tool with both editing and batch-processing capabilities, then continue with the requested task.
wspet:// custom protocol registered.wspet:// before normal conversions, OCR, optimize, or other real tasks. Send the actual wspet://param=... command directly, and only treat PDFelement as unavailable if the helper's protocol validation or the real launch reports that the protocol is missing, unparseable, or points to a missing executable.-wsclaw -autoexec -entrance OpenClaw, not just convert. Apply this to optimize, watermark, ocr, and all other commands as well.scripts\launch_wspet.ps1 on Windows because it builds the file payload without requiring Python. If scripts\launch_wspet.ps1 is missing but scripts\launch_wspet.ps1.md exists, first copy scripts\launch_wspet.ps1.md to scripts\launch_wspet.ps1 in the skill directory, then use the restored .ps1 helper. If PowerShell is unavailable, scripts\launch_wspet.cmd must apply the same protocol validation and install fallback before attempting a launch.scripts\launch_wspet.ps1, validate the wspet registration before launch by checking the protocol registry command and confirming its target executable still exists. If the key is missing, malformed, or points to a deleted binary, stop immediately and show the install fallback instead of trusting Start-Process alone.-autoexec countdown or skip auto-apply entirely. Before launching a file-backed task with scripts\launch_wspet.ps1, reset any existing PDFToolbox instance first: send /nowexit, wait briefly, then force-stop lingering PDFToolbox processes if they remain.wspet:// from a non-interactive agent context, PDFelement may open without the visible apply countdown unless the launch path matches an interactive test more closely. In scripts\launch_wspet.ps1, keep a short post-reset delay and a short pre-launch delay before the real wspet://param=... call so chat-triggered conversions behave like successful manual tests.cd into the install directory on Linux, set LD_LIBRARY_PATH=/opt/apps/PDFelement before launching PDFToolbox.DISPLAY available because the toolbox opens a UI.On Windows, use this order of checks:
scripts\launch_wspet.ps1 do the validation and real launch in one step.wspet\shell\open\command registration under both machine-wide and per-user classes.wspet://param=... task launch.Start-Process "wspet://" probe when you are explicitly debugging protocol handling in the current session.Prefer protocol registration plus executable existence over Start-Process return behavior, because some Windows shells report URI launch success even when the protocol handler is gone.
On Windows, if scripts\launch_wspet.ps1 determines that the wspet protocol is missing, malformed, or points to a deleted executable, respond with a short install-oriented message instead of attempting alternate unsupported launch methods.
Use this guidance:
wspet:// protocol is registered.Suggested response pattern:
I couldn't launch PDFelement because the `wspet://` protocol is unavailable on this machine. That usually means PDFelement is missing, not registered correctly, or the version is too old.
Please download and install/update PDFelement here:
https://pdf.wondershare.com/
After installation, try the PDF task again. If needed, restart Windows first so the `wspet://` protocol registration takes effect.
Match the request to one of these commands:
| Intent | Command |
|---|---|
| Convert PDF to another format | convert |
| Extract data from forms or tables | dataExtract |
| Compress or optimize PDF size | optimize |
| Run OCR on scanned PDFs | ocr |
| Translate PDFs | translate |
| Add watermarks | watermark |
| Add backgrounds | background |
| Add headers or footers | headerFooter |
| Add Bates numbering | batesNumber |
| Set passwords or permissions | security |
| Batch print PDFs | batchPrint |
| Delete blank pages | deleteBlankPages |
| Add signatures | sign |
| Split PDFs | split |
| Merge PDFs | combine |
| Crop pages | crop |
| Create PDFs | create |
If the request is ambiguous, ask which operation they want.
Use wspet:// custom protocol (requires PDFelement 12.1.14+):
wspet://param=<Base64EncodedCommandLine>
The entire command line is Base64-encoded in UTF-8 and passed as the param value. This protocol launches PDFToolbox with all parameters properly encoded.
All Windows commands must append the OpenClaw flags:
-wsclaw -autoexec -entrance OpenClaw
This requirement applies to every command, including convert, optimize, ocr, translate, watermark, and the rest of the toolbox commands.
If wspet:// protocol is not recognized, it means PDFelement is not installed or the version is too old. Guide the user to:
Start-Process "wspet://param=aG9tZSAtZW50cmFuY2UgT3BlbkNsYXc="PDFToolbox <command> [options...]
For GUI conversion tasks, prefer passing the input file with -f so the toolbox opens with the PDF already loaded and the user only needs to confirm settings and click convert.
Common options:
-entrance <value>: Recommended. Use OpenClaw when triggered by OpenClaw, AllToolsPage for other tools.-t <format>: Target format for convert, such as .docx, .xlsx, .pptx, .jpg, .png, .txt, .html, .xml, .epub, or .ofd.-f <base64xml>: Pre-load files and optional passwords using Base64-encoded UTF-8 XML.-wsclaw: Mark the command as triggered by OpenClaw. Mandatory on Windows for every command.-autoexec: Auto-execute after 10 seconds when files are loaded. Mandatory on Windows for every command.-hidden: Run hidden when the workflow supports it (Linux only)./activateform: Activate an existing instance without switching pages./exit or /nowexit: Close the running toolbox instance.Most operations open the corresponding toolbox UI. If -f is omitted, the user usually selects files in the UI.
Always use wspet:// protocol on Windows.
Always append -wsclaw -autoexec -entrance OpenClaw on Windows.
Prefer scripts\launch_wspet.ps1 over Python-based helpers on Windows.
# Recommended helper
.\scripts\launch_wspet.ps1 -Command convert -TargetFormat .docx -Files @("C:\Docs\input.pdf")
# Manual parameter build
$params = "convert -t .docx -f <base64_files_xml> -wsclaw -autoexec -entrance OpenClaw"
$base64Param = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($params))
Start-Process "wspet://param=$base64Param"
Quick test to verify wspet:// protocol is available:
Start-Process "wspet://param=aG9tZSAtZW50cmFuY2UgT3BlbkNsYXc="
If this fails with "No application is associated with the specified file", PDFelement is not properly installed. Guide user to:
# Standard launch
cd /opt/apps/PDFelement && ./PDFToolbox <command> [options...]
# When changing directory is inconvenient
LD_LIBRARY_PATH=/opt/apps/PDFelement /opt/apps/PDFelement/PDFToolbox <command> [options...]
# When agent must launch GUI through active desktop session
cd /opt/apps/PDFelement && DISPLAY=:1 XAUTHORITY=/run/user/1000/gdm/Xauthority DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus ./PDFToolbox <command> [options...]
# Convert to Word
$params = "convert -t .docx -f <base64_files_xml> -wsclaw -autoexec -entrance OpenClaw"
$base64 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($params))
Start-Process "wspet://param=$base64"
# OCR
$params = "ocr -f <base64_files_xml> -wsclaw -autoexec -entrance OpenClaw"
$base64 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($params))
Start-Process "wspet://param=$base64"
# Optimize
$params = "optimize -f <base64_files_xml> -wsclaw -autoexec -entrance OpenClaw"
$base64 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($params))
Start-Process "wspet://param=$base64"
# Watermark
$params = "watermark -f <base64_files_xml> -wsclaw -autoexec -entrance OpenClaw"
$base64 = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($params))
Start-Process "wspet://param=$base64"
cd /opt/apps/PDFelement && ./PDFToolbox convert -t ".docx" -entrance AllToolsPage
cd /opt/apps/PDFelement && ./PDFToolbox ocr -entrance AllToolsPage
cd /opt/apps/PDFelement && ./PDFToolbox optimize -entrance AllToolsPage
cd /opt/apps/PDFelement && ./PDFToolbox combine -entrance AllToolsPage
When you need to open the toolbox with a known file list, encode this XML as Base64 and pass it with -f:
<?xml version="1.0" encoding="UTF-8"?>
<Files>
<File>
<Path>/absolute/path/to/file.pdf</Path>
<Password></Password>
</File>
</Files>
Use absolute paths only. Add <Password> when a file is protected.
Use scripts/build_file_payload.py on Linux when Python is available, or use the Windows PowerShell helper to avoid a Python dependency on Windows:
python3 scripts/build_file_payload.py /absolute/path/to/input.pdf
.\scripts\launch_wspet.ps1 -Command convert -TargetFormat .docx -Files @("C:\Docs\input.pdf")
Then launch the conversion UI with the file already loaded:
Linux:
cd /opt/apps/PDFelement && ./PDFToolbox convert -t ".docx" -f "$(python3 /home/ws/.openclaw/workspace/skills/pdfelement-skill/scripts/build_file_payload.py /absolute/path/to/input.pdf)" -entrance AllToolsPage
Windows (wspet:// protocol):
.\scripts\launch_wspet.ps1 -Command convert -TargetFormat .docx -Files @("C:\Docs\input.pdf")
When an agent must open the GUI through the active desktop session, reuse the session variables and still pass -f:
cd /opt/apps/PDFelement && DISPLAY=:1 XAUTHORITY=/run/user/1000/gdm/Xauthority DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus ./PDFToolbox convert -t ".docx" -f "$(python3 /home/ws/.openclaw/workspace/skills/pdfelement-skill/scripts/build_file_payload.py /absolute/path/to/input.pdf)" -entrance AllToolsPage
Verified example on this machine:
cd /opt/apps/PDFelement && DISPLAY=:1 XAUTHORITY=/run/user/1000/gdm/Xauthority DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus ./PDFToolbox convert -t ".docx" -f "$(python3 /home/ws/.openclaw/workspace/skills/pdfelement-skill/scripts/build_file_payload.py /home/ws/Desktop/pdfelement-skill-test.pdf)" -entrance AllToolsPage
This flow has been verified to produce /home/ws/Desktop/pdfelement-skill-test.docx from /home/ws/Desktop/pdfelement-skill-test.pdf.
references/api-reference.md for the detailed command list, supported formats, control flags, and low-level parameter details.references/launch-templates.md for copy-ready Windows and Ubuntu command templates for common targets..docx, .xlsx, and .pptx for Office output unless the user asks for another format.-f.wspet:// protocol; do not attempt to call PDFToolbox.exe directly.wspet protocol registration through scripts\launch_wspet.ps1 instead of trusting a bare Start-Process probe.wspet:// fails validation on Windows, immediately guide user to install PDFelement from https://pdf.wondershare.com/.PDFToolbox instances first because stale single-instance windows can swallow or suppress the countdown.convert -t ".docx", convert -t ".pptx", and convert -t ".txt" plus -f <payload> have been verified to create the converted output beside the source PDF on the desktop-session path.DISPLAY, XAUTHORITY, and DBUS_SESSION_BUS_ADDRESS values when launching the GUI from an agent.Could not open display, explain that the command needs an X11 or desktop GUI session with DISPLAY available.libmono-native.so, retry from /opt/apps/PDFelement or set LD_LIBRARY_PATH=/opt/apps/PDFelement.references/api-reference.md when you need the detailed command list, supported formats, control flags, or file-parameter details.references/launch-templates.md when you want copy-ready Windows and Ubuntu command templates for common targets.If wspet:// protocol is not recognized (error: "No application is associated with the specified file" or "This file does not have a program associated with it"):
Start-Process "wspet://param=aG9tZSAtZW50cmFuY2UgT3BlbkNsYXc="If a registry check looks empty but the launch test succeeds: Treat PDFelement as available. Real launch behavior wins.
If Windows opens no GUI: Make sure the command is running inside the user's logged-in desktop session, not a service session or headless shell.
If Python is unavailable on Windows: Do not block on build_file_payload.py; switch to scripts\launch_wspet.ps1 or inline PowerShell XML-to-Base64 generation.
If -autoexec does not visibly count down or apply: Assume stale single-instance state first. Reset existing PDFToolbox windows with /nowexit, wait briefly, then force-stop lingering PDFToolbox processes before retrying the real task.
/opt/apps/PDFelement/PDFToolbox exists and is executable.chmod +x).cd /opt/apps/PDFelement && ./PDFToolbox ... or set LD_LIBRARY_PATH=/opt/apps/PDFelement.Could not open display: Ask the user to run the command in their logged-in desktop session instead of a headless shell, or reuse the active session's DISPLAY, XAUTHORITY, and DBUS_SESSION_BUS_ADDRESS., XAUTHORITY, and DBUS_SESSION_BUS_ADDRESS`.