Catalog PyPI
Back to packageRELEASE DETAILS

1.2.9

PyPI

advanced-office-tool

Advanced office document processing toolkit — Word (DOCX), Excel (XLSX), and other formats

Published20 Oct 2026
Direct dependencies17
Transitive dependenciesNot calculated

README

Version 1.2.9 documentation

Advanced Office Tool

Advanced office document processing toolkit — Word (DOCX), Excel (XLSX), and other formats.

Installation

pip install advanced-office-tool

Usage

Use ServerAgent for all document operations. Import once, call methods on any file path.

from advanced_office_tool import ServerAgent

agent = ServerAgent()

DOCX Translation

result = agent.translate_file(
    "manual.docx",
    target_language="en",       # "en", "zh", "auto", etc.
    target_format="{translated}" # or "{original}" or "{original}{translated}"
)
print(result["output_file_path"])
# → /home/ovos/.hermes/skills/office-tool/uploads/manual_en.docx

DOCX Merge (with auto CRC-32 repair)

from advanced_office_tool import DocxAgent, SafeDocument

# Merge with auto repair for corrupted files
agent = DocxAgent()
agent.load_document("chapter1.docx")
agent.merge_docx(["chapter2.docx", "chapter3.docx"], "merged.docx")

SafeDocument transparently repairs bad CRC-32 ZIP checksums:

from advanced_office_tool import SafeDocument
from docx import Document

# Broken DOCX auto-repairs on first access
doc = SafeDocument("corrupted.docx")
for p in doc.paragraphs:
    print(p.text)

PDF Conversion

# PDF → DOCX
result = agent.pdf_to_docx("scan.pdf")
print(result["content"])

# DOCX → PDF
result = agent.docx_to_pdf("report.docx")
print(result["content"])

# XLSX → PDF
result = agent.xlsx_to_pdf("data.xlsx")
print(result["content"])

# Images → PDF
result = agent.pngs_to_pdf(["img1.png", "img2.png"])
print(result["output_pdf_path"])

# PDF → PNG images
images = agent.pdf_to_png("document.pdf", dpi=300)
print(images)  # ["/path/to/page0.png", ...]

PDF Stamp

result = agent.add_stamp_to_pdf(
    "contract.pdf",
    position="80,80",           # top-right corner
    scale="1.5",                # stamp size multiplier
    stamp_image="./stamp.png"   # stamp image path
)
print(result["output_pdf_after_stamp"])

Excel Price Adjustment

result = agent.adjust_price_in_excel(
    "quote.xlsx",
    price_multiplier="1.3/6.9",  # unit_price * multiplier / divisor
    decimal_places="0"            # round to 0 decimals
)
print(result["output_file_path"])

Template Rendering

result = agent.render_docx_template(
    "template.docx",
    obj={"name": "Company A", "amount": 50000},
    output_path="output.docx"
)

PDF Merge to DOCX (N images per page)

result = agent.merge_pdfs_folder_to_docx_vertical(
    pdf_folder="./invoices",   # folder with PDF files
    number_in_page=2           # 2 PDF pages per DOCX page
)
print(result["output_file_path"])

Unzip

result = agent.uncompress_zip("archive.zip", "mt123456")
print(result["message"])

Available Classes

ClassDescription
ServerAgentMain orchestrator — PDF, Excel, DOCX, translation, templates
DocxAgentDOCX paragraph/table translation and manipulation
ExcelOperatorXLSX merge, formula, style, image manipulation
TranslateAgentpygtrans batch translate with terminology protection
SafeDocumentAuto-repair DOCX files with bad CRC-32 checksums

License

Apache-2.0

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 18

Native requirements
17 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
python-docx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
python-docx>=1.1.0runtime
openpyxl
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
openpyxl>=3.1.0runtime
pygtrans
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pygtrans>=1.2.0runtime
lxml
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
lxml>=4.0runtime
docxtpl
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
docxtpl>=0.16.0runtime
docxcompose
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
docxcompose>=1.3.0runtime
jinja2
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
jinja2>=3.0runtime
pymupdf
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pymupdf>=1.19.0runtime
pdf2docx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pdf2docx>=0.5.0runtime
pdfplumber
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pdfplumber>=0.9.0runtime
reportlab
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
reportlab>=4.0runtime
pandas
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pandas>=2.0runtime
Pillow
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
Pillow>=10.0runtime
yt-dlp
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
yt-dlp>=2023.0runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8.0; extra == "dev"runtime
black
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
black>=24.0; extra == "dev"runtime
ruff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
ruff>=0.4.0; extra == "dev"runtime
reportlab
Environment
{
  "extras": "",
  "marker": "extra == \"pdf\"",
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
reportlab>=4.0; extra == "pdf"runtime

Distribution files

1 collected
advanced_office_tool-1.2.9-py3-none-any.whl

bdist_wheel · 59.74 KB · Python py3

Source file

Repository

PENDING
user/advanced-office-tool

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:58 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:80843dac3793fcc299201e74dcd443cc5f6183210d58b5729baff2199abca14a

Other collected versions

View all collected versions →