mcpField
B
bitrix-documentgenerator

bitrix-documentgenerator

github.com/bxmaximumDocuments4778 installsUpdated 2w ago
Repository

About bitrix-documentgenerator

A reference skill for Bitrix document generation in Bitrix24 editions, covering cloud and on-premise installations. It guides template setup, custom data providers, document generation, access checks, storage, and asynchronous PDF conversion.

Key features

  1. 01Template placeholders, modifiers, tables, and images
  2. 02Custom entity data providers
  3. 03DOCX and PDF generation guidance
  4. 04Template and document access checks
  5. 05Storage, deletion, and generation events

Use cases

  1. 01Creating templates in a Bitrix module
  2. 02Generating documents from custom entity data
  3. 03Handling asynchronous PDF conversion

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bxmaximum/bitrix-framework-skills --skill bitrix-documentgenerator

After installing, type/bitrix-documentgeneratorin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

rules/
access-rest.md
generation.md
providers.md
templates.md

Details

From the project README

Bitrix document generator

Baseline: main 23.0+ · Verified: documentgenerator 26.200.100, main 26.800.0

Bitrix24 editions only (cloud and on-premise): install requires humanresources; absent from "Site Management". PDF/JPG need module transformer and a document server.

TaskRead
Placeholders, modifiers, tables, images, create template from coderules/templates.md
Own entity data: provider class, fields, lists, registrationrules/providers.md
Generate DOCX/PDF, numbers, storage, delete, eventsrules/generation.md
Module rights, roles, template access, REST, UI componentsrules/access-rest.md

CRM documents (invoices, deals) use CRM's own providers: bitrix24-crm.

Invariants

  • Loader::requireModule('documentgenerator'); code lives in your module under /local/modules/, the provider is registered by that module id.
  • Template MODULE_ID = provider MODULE = an installed module; otherwise the provider is silently ignored.
  • Call Template::setSourceType() before getFields() / Document::createByTemplate() and check getSourceType().
  • Check rights explicitly: UserPermissions, template access, Document::hasAccess(). Loading and creating check nothing; user 0 passes data checks.
  • Reference files by b_documentgenerator_file.ID (FILE_ID, PDF_ID); convert with FileTable::getBFileId().
  • PDF is asynchronous: generate with getFile(false) or skip conversion errors, react to onDocumentTransformationComplete.

Comments

Markdown supported