Shipping Invoice Template for Document Generation

A complex transportation invoice with multiple waybills.

The page has a landscape orientation.

Example in detail

This commercial invoice uses tables within tables to display nested shipping data.

Nested tables

An <<rs_ repeating section is used around the outer table to show the details of each individual waybill/shipment.

Inner tables contain <<rr_ repeating rows to show the details associated with that waybill/shipment: 

  • all the items
  • all the charges

If a waybill has many shipped items, then both the inner shippedItems table and the outer waybills table grow down the page to accommodate the extra line items.

For further information and technical examples using the <<rs_ and <<rr_ directives, see Repeating Sections and Tables.

Controlling table behavior

This template is designed to typically show 2 waybills per page, whilst making sure that a single waybill is not split between pages. Thus, if two waybills are too long for one page, the entire second waybill will go onto the next page.

The Microsoft Word Paragraph and Table Properties are used to prevent a waybill from splitting over two pages.

To keep sections of the table together: select the sections to keep together. In the Paragraph pop-up window, select "Keep with next".

To prevent a table from splitting over two pages: right-click on the table in the template and select Table Properties, then deselect "Allow row to break across pages".

Built-in Docmosis variables

This example uses two of the built-in Docmosis variables available for use within repeating sections/repeating rows.

As shown below:

<<$itemnum>> shows the index of the current item, starting from 1, in the waybills data set.

<<$size>> returns the total number of items in the waybills data set.


Invalid Input

Sorry, this field will only accept letters and numbers, and not special characters, to limit spam. Please also consider contacting if you need help with this article.

Sorry, this field will only accept letters and numbers, and not special characters, to limit spam.

Invalid Input

Document Gallery

Docmosis showcases its template-based document generation capabilities through a gallery of downloadable PDF documents. The gallery features a mixture of real documents provided by customers as well as links to PDFs generated from example templates, desgined to illustrate the versatility of Docmosis.