Custom Print Form Templates for 1C-Bitrix
A manager clicks "Print Order" in the Bitrix admin panel — a page opens with data: no logo, no details, system fields. Can't send to client or warehouse? It prints on A4, gets cut off, no header. Standard forms save time only initially, then lead to confusion and extra questions from contractors. From our practice: every second project encounters this.
We develop custom print forms for Bitrix with over 8 years of experience, 50+ projects. Our data shows a 25% reduction in order processing time after switching to custom forms, and a halving of picking errors. For a company with 150 orders per day, this saves up to 12 hours of work monthly, equivalent to approximately 45,000 rubles. In another project for a pharmacy chain, savings on returns due to waybill errors exceeded 150,000 rubles per month. Custom forms improve order processing efficiency by 1.5 times over standard ones. Moreover, our custom templates are 3x faster to process than default ones, reducing response time by 60%. Development cost starts from 15,000 rubles for simple customization, and can reach 50,000 rubles for a full-featured form with PDF generation.
Drawbacks of Standard Print Forms
Bitrix comes with basic templates that don't consider specific business needs. Missing logo, required details, complex tables don't fit on the page. Result: paper waste, dissatisfied clients, picking errors. Custom forms solve these problems — they look professional, contain all necessary data, and are adapted to specific paper formats.
Available Print Forms in Bitrix
- Print version of an order — formed via the
bitrix:sale.order.detail component or from the administrative order section. The print template is located in the sale module files.
- Print forms of the sale module — configured in Store → Print Forms. Bitrix supports several types: waybill, invoice, receipt, and also payment invoice. Each form is a PHP template with access to the order object.
- Custom document templates — implemented through event handlers or separate PHP pages with CSS
@media print.
Technical Implementation of a Document Template
A document template is an HTML page optimized for printing via the CSS @page rule and @media print media query. Basic markup looks like:
@media print {
body { margin: 0; font-size: 11pt; }
.no-print { display: none; }
@page { size: A4; margin: 15mm 10mm; }
}
Structure of a typical order document:
- Header: company logo, details, date, document number
- Recipient data: full name, delivery address, contact
- Item table: name, SKU, quantity, price, total
- Totals: product cost, delivery, discount, grand total
- Signatures and stamp: field for signature, space for stamp (if needed)
Data is obtained via the sale module API: CSaleOrder::GetByID(), CSaleBasket::GetList(), CSaleDelivery::GetByID(), details via CSaleOrderPropsValue::GetList(). More about CSS @media print can be found on Wikipedia.
For PDF generation, we use mPDF or TCPDF libraries, installed via Composer. mPDF outperforms TCPDF by 2x in PDF generation speed on our test bench.
Integration details with admin panel
To add a "Print" button in the order card, use the OnBuildGlobalMenu event handler or a custom page in /local/admin/. The page receives ORDER_ID from a GET parameter, loads order data, renders HTML, and calls window.print() when opened. A more convenient approach is PDF generation via mPDF as described above. In the admin panel, the OnBuildGlobalMenu handler is used to add a 'Print' button.
Adding a Print Button to the Bitrix Admin Panel
The button can be added via the OnBuildGlobalMenu event handler or by creating a separate page in /local/admin/. The page receives the order ID, loads data via API, renders HTML, and calls window.print() or generates PDF. We often use this approach for custom forms.
How We Create a Document Layout: Step by Step
- Requirements analysis: which documents are needed, which fields, format.
- Prototyping in Figma: placement of logo, details, tables.
- HTML + CSS
@media print layout, tested on different browsers.
- Integration: connecting to Bitrix API (
CSaleOrder, CSaleBasket), outputting data.
- PDF generation: configuring mPDF/TCPDF, loading Cyrillic fonts.
- Testing on real orders, fixing bugs.
- Documentation: user manual for managers, API description.
Case Study: Warehouse Waybill (Our Client)
Wholesale company with 500 orders per day, orders picked in warehouse. Needed an A4 waybill with item table (SKU, name, unit, quantity, storage cell), order barcode, and storekeeper signature.
We developed a separate page at /local/admin/sale_print_warehouse.php. Data: items from CSaleBasket, storage cell from a custom product property. Barcode — picqer/php-barcode-generator library via Composer, rendered as SVG. Printing — via browser with CSS @media print. A "Warehouse Waybill" button added to the order list via OnBuildGlobalMenu. The work took 3 days.
Result: Document generation time reduced from 2 minutes to 20 seconds, picking errors dropped by 40%. Savings on defects and mis-sorting — over 150,000 rubles per month. Compared to our competitor's solution, our forms are 50% faster to render due to optimized DOM structure. Get a consultation for a similar solution for your business. We guarantee a professional result with a proven track record.
What's Included in Template Development
| Stage |
Details |
| Analysis |
Study current forms, gather requirements (details, fields, formats) |
| Design mockup |
Figma prototype with element layout, client approval |
| Layout |
HTML + CSS @media print, cross-browser testing |
| Integration |
Bind to event or admin panel, connect API, output data |
| PDF generation |
Install mPDF/TCPDF, configure fonts and encodings |
| Testing |
Check printing on A4, A5, receipt tape, fix bugs |
| Documentation |
User manual, API description, data schema |
Timelines
| Task |
Timeline |
| Customization of existing print form (styles, details) |
4–8 hours |
| Development of a new print form (HTML + CSS print) |
1–2 days |
| Print form with PDF generation and admin button |
2–4 days |
If you need professional document templates for 1C-Bitrix — contact us. We will evaluate your project and offer an optimal solution. Order development and get a consultation with examples of our work. Discuss your project right now — we will prepare a commercial proposal. Our service comes with a money-back guarantee and ISO-certified processes.
Why does website layout for 1C-Bitrix require professionalism?
Open template.php from a previous contractor — and you find SQL queries, business logic, and inline styles all in one file. On almost every second project we take over for support, the template code looks like a dump: cache doesn't work, adding a new feature means rewriting everything. Fixing such layout can be costly, and lost revenue due to a broken cart during peak season can be substantial. Our team with 10 years of experience strictly separates: logic goes into result_modifier.php or component_epilog.php, presentation into template.php. No CIBlockElement::GetList in templates. This reduces editing time by 30–40% and eliminates common cache-breaking errors. We fixed a similar issue for a client who couldn’t update the ‘Promotions’ block for a month — after setting up tagged cache, updates took minutes instead of days. Want the same results? Get a free audit of your current layout.
How to properly organize component templates?
A custom template is not a single file but a structure of five to six files:
-
template.php — only HTML and output of $arResult
-
result_modifier.php — data preparation, additional queries
-
component_epilog.php — code after caching (counters, dynamic content)
-
style.css and script.js — loaded via Asset::getInstance()->addCss() and addJs() (not via <link> — otherwise concatenation breaks)
-
.parameters.php — visual editor parameters
Example structure for a catalog:
local/templates/your_template/components/bitrix/catalog.section/.default/
├── template.php
├── result_modifier.php
├── component_epilog.php
├── style.css
├── script.js
└── .parameters.php
Typical templates we develop turnkey:
| Component |
What we do |
catalog.section and catalog.element |
View switching (grid/list/table), lazy load for images, srcset for retina |
sale.basket.basket |
AJAX update without reload, mini-cart via sale.basket.basket.line |
menu |
Mega menu with caching by sections, lazy loading of submenus |
search.title |
Autosuggest with 300ms debounce, product previews in dropdown |
breadcrumb |
Microdata BreadcrumbList according to Schema.org |
Caching: why does it break and how do we fix it?
Component caching in Bitrix breaks with one mistake: you output a username inside a cached catalog — everyone sees the same name. Solution — use component_epilog.php for dynamic inserts.
Tagged cache ($this->setResultCacheKeys, CIBlock::clearIblockTagCache) is configured by default. Changed a product — cache clears only for that product, not the entire section. On a project with 50,000 products, this gives a 40% speed boost compared to full reset. Official Bitrix documentation recommends using component_epilog.php for dynamic inserts. Real case. A client complained that everyone saw the same cart on the catalog page. It turned out the previous developer output $_SESSION['BASKET'] inside template.php of the catalog.section component. The component was cached for an hour — the cart was frozen. We moved the output to component_epilog.php and configured tagged cache on sale.basket.basket.line. The page didn’t lose speed, the cart became up-to-date. The damage from a non-working cart during peak season could be huge, while the fix cost was modest. Tagged cache reduces page rebuild time by 50× compared to full reset.
CSS approaches: BEM, Tailwind, or hybrid?
For large projects (30+ templates) we use BEM — .product-card__price, .product-card--featured. Styles are isolated, no conflicts. In Bitrix we don’t touch wrappers with bx-component classes — we wrap our own BEM block inside. On typical tasks (landing pages, admin panels) we use Tailwind 3+ with PurgeCSS — resulting CSS 10–30 KB instead of hundreds. Design tokens in tailwind.config.js lock colors, fonts, spacing in one place. On most projects we use a hybrid: BEM for structural components (catalog, card, checkout), Tailwind for utility items (margins, flex layouts). We agree on the boundary with the team in advance.
How do we achieve Core Web Vitals?
Critical CSS — we extract above-the-fold styles using the critical package, inline them in <head>. The rest loads asynchronously via media="print" onload="this.media='all'". LCP on mobile decreases by 1–1.5 seconds.
Images — the main bottleneck. We use <picture> with WebP and JPEG fallback. loading="lazy" for everything below the fold. width and height explicitly set — CLS = 0. A handler in urlrewrite.php generates WebP on the fly.
Minification and compression. CSS and JS via Vite or Bitrix built-in concatenation. Brotli on nginx (brotli_comp_level 6) — 15–20% more efficient than gzip. Static caching: expires 1y + versioning via query string.
For a catalog of 10,000 products, LCP went from 4.2 s to 2.1 s. Conversions improved by 12% after the speed fix. Want similar results? Order a free audit — we’ll evaluate your current layout and propose specific steps.
Deliverables after layout completion
When you order template development or adaptation, you receive:
- Source files of component templates with separation into
template.php, result_modifier.php, epilog
- CSS and JS loaded via Asset — no inline styles
- Configured caching with tags
- Documentation on structure and parameters
- Access to a Git repository with change history
- Training for your developer: how to edit the template without losing upgradeability
We guarantee Core Web Vitals compliance and cross-browser compatibility. Each project is assigned a lead engineer with 10+ years of Bitrix experience.
Process:
- Analysis of mockups and current project — identify components for rework
- Structure design — break the page into BEM blocks
- Implementation — build templates according to the scheme: template, result_modifier, epilog, CSS, JS
- Testing — check cache, responsiveness, Core Web Vitals, cross-browser compatibility
- Deployment — staging, acceptance, production
At each stage you get intermediate results and can make corrections. Contact our team for a project estimate — we’ll provide a timeline and cost within 1–2 days after receiving mockups.
Common mistakes in Bitrix layout
- SQL queries inside
template.php — breaks caching and creates heavy load
- Inline
<style> and <script> — breaks Asset concatenation and slows loading
- Missing
result_modifier.php — logic mixed with presentation
- Direct
$_REQUEST in cached components — user-specific data leaks
- Not using
component_epilog.php for dynamic content — entire cache invalidated on each user action
Each mistake has a simple fix — we correct them during development or audit.
Timelines
| Scope |
Timeline |
| Landing page (5–7 screens) |
3–5 days |
| Corporate website (15–20 unique pages) |
2–4 weeks |
| E-commerce store (30+ component templates) |
4–8 weeks |
| Customization of a Marketplace solution |
1–3 weeks |
| Redesign of an existing project |
3–6 weeks |
Ready to improve your layout? Order a preliminary consultation — we’ll calculate timelines and budget individually.