Ventoo Document Merger combines multiple documents into a single PDF file during the report rendering process. This happens automatically when you print or preview a supported document, and the merged output replaces the standard single-report PDF.
How PDF merging works
The merging process is triggered by the report extension's OnPreRendering event. The following steps occur:
-
Business Central begins rendering the main report (for example, Standard Sales - Invoice).
-
The Ventoo Document Merger report extension intercepts the rendering process.
-
The system retrieves the document composition for the current document.
-
Each included document is appended to the PDF in sequence order.
-
The merged PDF is returned to Business Central for output (print, preview, or email).
Note The main report (Sequence 1) is rendered by Business Central as usual. Ventoo Document Merger appends additional documents after the main report content.
Supported source types for merging
|
Source type |
How it is merged |
|---|---|
|
Document Attachment |
The attached file is read directly from the Document Attachment record and appended to the PDF. |
|
Incoming Document |
The file is read from the Incoming Document Attachment record and appended to the PDF. |
|
BC Report |
The report is rendered to PDF using the stored report configuration (filters and options) and appended. |
|
Static Document |
The pre-uploaded file is read from the Static Document record and appended. |
What happens during email sending
When a document is sent by email, Ventoo Document Merger handles two distinct scenarios:
-
Standard merge - All included documents are combined into a single PDF that replaces the standard email attachment.
-
Attach separately - Documents marked with the Attach Separately flag are excluded from the merged PDF and added as individual email attachments.
Learn more at Email handling.
Supported reports
Ventoo Document Merger includes report extensions for the following standard Business Central reports:
|
Report |
Description |
|---|---|
|
Standard Sales - Invoice |
Sales invoices |
|
Standard Sales - Quote |
Sales quotes |
|
Standard Sales - Order Conf. |
Sales order confirmations |
|
Standard Sales - Credit Memo |
Sales credit memos |
|
Standard Purchase - Invoice |
Purchase invoices |
|
Standard Purchase - Quote |
Purchase quotes |
|
Standard Purchase - Order |
Purchase orders |
|
Standard Purchase - Credit Memo |
Purchase credit memos |
|
Reminder |
Issued reminders |
Tip The merge only occurs when Ventoo Document Merger is enabled for the corresponding document type in the general setup. When disabled, reports render normally without any merging.
Troubleshooting
Documents are not being merged
-
Verify that Ventoo Document Merger is enabled for the document type on the Doc. Merge Setup page.
-
Check that the document composition contains entries with Included = Yes.
-
Ensure the rules are set to Active = Yes.
Merged PDF has incorrect page order
-
Open the document composition and verify the sequence numbers.
-
Use Move Up and Move Down to reorder.
A specific attachment is missing
-
Check if the file matches the File Name Pattern and File Type Filter in the applicable rule.
-
Check if the file is excluded by the Exclude File Name Pattern.
-
Verify the document composition to see if the file was discovered but marked as excluded.