vianetz | Software Engineer for Magento®

Magento 2 safe

We guarantee that all extensions will be available for Magento 1 and 2.

7 Days Money Back Garantuee

Within a timeframe of 7 days you are allowed to get the money back from us if you are not confident with our modules.


More Views

Advanced Invoice Layout for Magento 2

Your Shop - Your Style: simply customize all PDF layouts in your shop

(4.7 Stars)
  • Customizable Layouts for PDF invoices/shipments/creditmemos via HTML/CSS (Sample)
  • send PDF as attachment for order email
  • feature-rich (personalization, crosssells, specific texts, etc.)
  • developed by a Magento Certified Developer since 2008
  • compatible with Magento Community Edition 2.1.x - 2.3.x
Please type in your Magento Admin domain, e.g.

* Required Fields

* Prices excl. tax. Downloadable products, no shipping costs.


  • New: Use your PDF layouts 1:1 from Magento 1, no need to change any templates!
  • Display of custom product attributes on PDF invoice
  • Display crosssell products on PDF invoice document
  • Use of own's letter paper
    The letter paper can be deposited as a PDF template file.
  • API-Interface for Developers
  • 2- and 3-column footer layout
  • Possibility to download the PDF invoices, shipments and creditmemos in the frontend for the customer
  • Support for Downloadable Products
  • Support for Bundled Products
  • Sending of PDF invoice as attachment
  • Automatic logo scaling and positioning via the administration interface
  • Display of additional informations, e.g. invoice date and customer number
  • Display of customer comments
  • Compatibility with module Checkout Fields Manager: Display of checkout attributes on PDF invoice
  • Possibility to differentiate taxes by classes and display of different tax labels
  • Possiblity to show Tax / VAT number and email address of the customer on invoices
  • Font size adjustable via administration interface
  • Free Text input with placeholders for invoice, shipment and creditmemo
  • Decrease of PDF file size by approximately 90 %
  • Display of gift messages on invoice and shipment
  • Different layouts per StoreView
  • View download links in invoice
  • Configuration of footer text via the administration interface
  • simple customization by user due to detailed code comments
  • Fully compatible with the extension "Market Ready Germany", i.e. the module symmetrics_invoicepdf will be replaced with AdvancedInvoiceLayout, all other parts of the package can be used without restrictions.
  • easy and fast installation
A document with installation notes is available in the Samples section.

Technical Information

Module compatible with Aschroder_SMTPPro, Firegento, Idev_OneStepCheckout, Iways_PaypalPlus, M2EPro, Mage_BankPayment, Mage_Debit, Market Ready Germany, Payone, Vianetz_AutomaticInvoice, Vianetz_TaxVatCheck
Language files in this package English - en_US, French - fr_FR, German - de_DE, Nederland - nl_NL
Module Version 1.4.1
Extension Coding Standard PSR-2
Extension Rewrites
  • Mage_Core_Model_Email_Template_Mailer (only required for the email attachments),
  • Mage_Sales_Model_Order_Pdf_Invoice, Mage_Sales_Model_Order_Pdf_Shipment, Mage_Sales_Model_Order_Pdf_Creditmemo (these rewrites are all optional and only exists for backward compatibility with other 3rd-party extensions)

Technical Information

Module compatible with Aschroder_SMTPPro, Firegento, Idev_OneStepCheckout, Iways_PaypalPlus, M2EPro, Mage_BankPayment, Mage_Debit, Market Ready Germany, Payone, Vianetz_AutomaticInvoice, Vianetz_TaxVatCheck
Language files in this package English - en_US, French - fr_FR, German - de_DE, Nederland - nl_NL
Module Version 1.4.1
Extension Coding Standard PSR-2
Extension Rewrites
  • Mage_Core_Model_Email_Template_Mailer (only required for the email attachments),
  • Mage_Sales_Model_Order_Pdf_Invoice, Mage_Sales_Model_Order_Pdf_Shipment, Mage_Sales_Model_Order_Pdf_Creditmemo (these rewrites are all optional and only exists for backward compatibility with other 3rd-party extensions)
There is no warranty, that the information in documents on this website and related ones are complete, correct and up-to-date in every case. The consultation of a legal practitioner is always recommended.
Completely all the features mentioned on this site are only available for the latest Magento version. Former Magento releases may have a lack of some functionalities.
If the functionality of modules from other vendors intersect with this one, unpredictable issues may arise.
Please get informed about our License Agreement and our thinking about Commercial Open Source.

Are there any more information about our Magento Extension that you would like to see here? Just contact us.

Frequently Asked Questions

Can I get a license for my development/staging domain?

These licenses are included in every production domain license. Please send us after your purchase for your production domain an email with your order number and the desired development domain. We're happy to extend your license then.

Cyrillic characters are displayed as "?" on the Magento PDF invoice. What can I do?

The problem is that the chosen font family does not support the Cyrillic characters. So far no font with Cyrillic support is included into the AdvancedInvoiceLayout extension. That means that you have to get your own font family with support for Cyrillic characters and include it into the AdvancedInvoiceLayout extension.

Please get in touch with us so we can send you a description of the simple steps to perform in this case.

Error message "Mage registry key already exists" after extension installation
After installing a Magento extension you get the following error message, e.g. if you try to login the Magento admin backend:
Mage registry key <...> already exists

Please confirm that you followed all installation steps that are mentioned in the Readme file of the module. Especially assure that the Magento cache is cleared, e.g. by emptying the var/cache/ directory in a Magento default installation and that the Magento compilation process has been triggered (if enabled).
How can I activate the PDF email attachment feature with other email extensions like Ebizmarts_Mandrill?

Important note

This issue is resolved in AdvancedInvoiceLayout Version 2.2.0. Please contact us to check if you can upgrade.

Short explanation

To realize the email attachment functionality in our AdvancedInvoiceLayout extension we had to extend the Magento core email logic to add methods for attaching documents. Unfortunately there is no way to do this without conflicts with other extensions that do the same, e.g. Ebizmarts_Mandrill or Aschroder_SMTPPro.


To solve this problem the following manual steps are required:

  • Make the AdvancedInvoiceLayout extension dependant on the other extension by creating a new file app/etc/modules/ZVianetz_AdvancedInvoiceLayout_Compatibility.xml with the following content (replace OtherVendor_OtherExtension with the extension name)
  • Copy the file app/code/community/Vianetz/AdvancedInvoiceLayout/Model/Email/Template to app/code/local/Vianetz/AdvancedInvoiceLayout/Model/Email/Template and replace the beginning with
    Vianetz_AdvancedInvoiceLayout_Model_Email_Template extends Ebizmarts_Mandrill_Model_Email_Template
  • Flush the Magento Cache

Please find also further general discussions in this support thread.

How can I configure the address format?
Since Magento 1.5 the address format can be configured under System->Configuration->Customer Configuration->Address Templates->PDF. Newlines are marked as pipes (|).
How can I configure the tax format on the PDF invoice?
Following a sample for a AdvancedInvoiceLayout tax configuration that many of our German shop owners use (based on Magento 1.7.x):
  • System » Configuration » AdvancedInvoiceLayout » General » Tax Display: Including Tax
  • System » Configuration » Tax » Orders, Invoices, Credit Memos Display Settings » Include Tax In Grand Total: Yes
  • System » Configuration » Tax » Orders, Invoices, Credit Memos Display Settings » Display Full Tax Summary: Yes
    (if this is set to "No" tax is not splitted into percent classes)
How can I create different PDF invoice layouts for different Magento store views?

With our Advanced Invoice Layout Extension for Magento you can easily create store view specific layouts, texts, logos or colors. Therefore you can easily change the store view switcher on the Advanced Invoice Layout configuration page in the Magento backend.

If you want further more layout customizations to the HTML files there are 2 possibilities:

  • If you use already different Magento themes you can easily do the customizations in the appropriate theme folder (please also see our FAQ entry How to change the Magento PDF invoice layout?). I.e. you just do the customizations e.g. in app/design/frontend/theme1/default/advancedinvoicelayout and app/design/frontend/theme2/default/advancedinvoicelayout.
  • Additionally there is the possibility (e.g. if you use the same theme for both store views) to create own themes in the Advanced Invoice Layout extension.
How can I customize the payment block in the Magento PDF invoice?
The AdvancedInvoiceLayout Extension prints a block with information about the chosen payment method onto the PDF invoice. This block is dynamically filled by the used Magento Payment Extension, e.g. PayPal, DebitPayment, Credit Card, etc. and so this is information is contained in the appropriate Extension files. For example for PayPal the payer email address is printed, for credit cards the credit card number and so on.

So if we want to customize e.g. the text/formatting that is printed on the invoice in case of "Purchase Order" payments we have to do the following steps:
  • copy file app/design/frontend/base/default/template/payment/info/purchaseorder.phtml to your theme folder i.e. app/design/frontend//default/template/payment/purchaseorder.phtml
  • customize the file to your needs

Basically it is always recommended to activate the Debug Mode of the AdvancedInvoiceLayout extension for testing different layouts under System > Configuration > AdvancedInvoiceLayout. With activated Debug Mode the intermediate HTML file will be saved with each print of the PDF invoice, shipment or creditmemo into the directory var/tmp/invoice_debug.html. Therewith you can analyze and customize the HTML structure and CSS style sheets more easily.
However you are advised to disable this setting in production environments for performance reasons.

This process can be done analoguous for other payment methods as well.

Please see also how to customize the Magento PDF layout in general.

How can I display the Amazon Order Id on the Magento PDF invoice?
If you use the Magento Extension M2EPro you can easily display the Amazon Order Id on the Magento PDF invoice with our Advanced Invoice Layout Extension with the following code:
echo Mage::helper('M2ePro/Component_Amazon')->getModel('Order')
->load($this->getOrder()->getId(), 'magento_order_id')
You can find more information in our FAQ on how to customize the templates.
How can I force a page break in the Magento invoice PDF?

A page break can be forced in the invoice PDF by adding an HTML element with the CSS class pageBreak.

See also our FAQ article on how to customize the Magento invoice PDF layout.

How can I install the vianetz Magento extensions via composer?

Of course you can also install our proprietary Magento extensions via composer.
Therefore please follow these steps:

  • Contact us to get your access credentials. You will receive the repository URL, a username and a password.
  • Add this to your composer.json file:
    "repositories": [{
        "type": "composer",
        "url": ""
  • In your Magento installation type composer require vianetz/module-advancedinvoicelayout and enter the credentials that we provided to you.
How can I move the logo on the Magento PDF invoice to the left?

If you use our extension Advanced Invoice Layout for Magento it is very easy to move the logo on the PDF documents (invoice/shipment/creditmemo) to the left or right. Just enter the following CSS snippet into System > Configuration > Advanced Invoice Layout > Custom CSS to move the logo to the left:

#header #storeLogo { text-align: left; }
How can I print barcodes on the Magento PDF invoice?
With our Advanced Invoice Layout Extension for Magento it is very easy to print barcodes of any code on the Magento PDF invoice, shipment or creditmemo.
All you have to do is to choose a font family that supports your desired barcode format and use that in the Advanced Invoice Layout CSS file for printing the barcode. Voilà!

See also our FAQ article on how to customize the PDF invoice layout.

How can I run the unit tests for your extension?
The unit tests of our extensions are based on the EcomDev_PHPUnit module that can be found on Github.
For installation instructions please see the appropriate manual.

After installation of the EcomDev_PHPUnit extension you can run e.g. the AdvancedInvoiceLayout tests by the following command in the root folder of your Magento installation:
phpunit --group Vianetz_AdvancedInvoiceLayout

If everything is fine you should get a green output that says that all tests ran successfully.
How can I show additional text in tax-free PDF invoices in Magento?

Our Advanced Invoice Layout Extension for Magento allows you to have customer group specific texts on the PDF invoice document.
Therefore on the customer group configuration page in the Magento admin panel there is an additional text field where you can enter HTML-text that will be displayed on PDF invoices if the customer is contained in that customer group.

The automatic group assignment is a standard Magento feature which is explained in more detail in the Magento Documentation.
How can I show custom attributes on the Magento invoice?
With our Advanced Invoice Layout Extension for Magento 1 it is very easy to display custom product attributes on the Magento PDF invoice, shipment or creditmemo.

Therefore the extension has a configuration setting where you can easily select which product attributes you want to show on the invoice, shipment and creditmemo PDF:

Show custom attributes on invoice, shipment or creditmemo PDF in Magento

If you want to display custom product attributes with our Advanced Invoice Layout Extension for Magento 2 you can add custom attributes to the PDF invoice by adding the following code to the theme template file default/item/invoice.phtml:

echo $this->getProduct()->getData('your_attribute_code');

The sample applies also for the shipment and creditmemo PDF documents.

How to install the Magento 2 extension?
Please find as follows a short overview how to install our Magento 2 extensions, using the sample of the Advanced Invoice Layout for Magento 2 extension:

Are you looking for installing the extensions on Magento 1? Then please have a look at our related FAQ article.

Do you want to install the extension via composer? Please see our FAQ article about installing with composer.


  • Make sure that "composer" is installed on your system. For details see these composer installation instructions.
  • Get your Magento API access keys (required for composer authentication) , as described in the Magento documentation.
  • Do a backup of your Magento installation for safety reasons (database and files).
  • Uninstall probably existing previous versions of the extension

Installation with Composer

  • 1 Create a new folder for the extension in app/code/, e.g. app/code/Vianetz/AdvancedInvoiceLayout.
  • 2 Unzip the setup package and copy the contents into the newly created folder. The folder structure should now be app/code/Vianetz/AdvancedInvoiceLayout/Block, app/code/Vianetz/AdvancedInvoiceLayout/etc, etc.
    Please assure that the files are uploaded with the same file user permissions as the Magento installation!
  • 3 Install extension requirements via composer on the command line in your Magento root directory:
    composer require vianetz/pdf-generator:1.* vianetz/module-core:1.*
    Note: If you use e.g. an older PHP version on the command line than on your webserver then you can add the command line argument --ignore-platform-reqs to ignore PHP version checks.
  • 4 Enable the Extension and run the setup process by executing the following on the command line in your Magento root directory:
    bin/magento module:enable Vianetz_Core Vianetz_AdvancedInvoiceLayout
    bin/magento setup:upgrade
  • 5 Restart compilation (only required in Magento Production mode):
    bin/magento setup:di:compile
  • 6 Clear the Magento cache (e.g. System > Cache Management) and related caches if available (e.g. APC, Varnish, ..).

Congratulations, the installation has been successfully completed!

How to migrate Advanced Invoice Layout templates from Magento 1 to Magento 2?
If you use our Advanced Invoice Layout extension for Magento 1 and you want to migrate your shop to Magento 2, there are a few simple steps to make the invoice, packing slips and creditmemo PDF look nice:
  • Purchase the Advanced Invoice Layout extension for Magento 2
  • Copy all your template files from the Magento 1 extension from app/design/frontend/base/default/template/advancedinvoicelayout to the Magento 2 extension in view/base/templates/
  • Copy all the CSS files from Magento 1 from skin/frontend/base/default/advancedinvoicelayout to the Magento 2 extension in view/base/web/
  • Replace all occurrences of
How to translate the Magento PDF invoice?

With our AdvancedInvoiceLayout extension you are able to customize the Magento default PDF invoice layout to adapt it to your needs and improve the look'n'feel of the invoice.
Therefore you can also easily add your own translations (of course this in accordance to Magento best practices):

  • Identify the text string that you want to translate in the template files in app/design/frontend/base/default/template/advancedinvoicelayout, e.g. the string "Invoice #%s" in app/design/frontend/base/default/template/advancedinvoicelayout/default/invoice.phtml
  • Search for this text string in file app/locale/xx_XX/Vianetz_AdvancedInvoiceLayout.csv with xx_XX being the locale code, e.g. "de_DE".
  • If the text string is available just change the translation to your needs, otherwise add a new line at the end of the file with your translation like
    "Invoice #%s","Ihre Rechnung Nr. %s"
  • Flush the Magento Cache in the backend
I get a "404"-Error after the installation of the extension
Symptom: A 404 error is shown if you go to System->Configuration and choose e.g. AdvancedInvoiceLayout tab.

To solve this kind of error you need to log out of the backend and log in again. Then the tab should be successfully accessible.
I get the error message "There has been an error processing your request". What can I do?
Please take a look at the var/report directory and look for a file with the number mentioned in the error report. This file contains additional information about the problem. If you do not have a solution for this please send us the contents of the file to
Magento shows a Blank Page
While executing some actions Magento is only showing a blank page without any content.
This behaviour is mostly caused by a Fatal PHP error. Please have a look into your PHP log files (perhaps ask your hoster) and/or see the Magento error log in the directory var/log of your Magento installation.
PDF documents cannot be generated when using a PDF background template file
Solution: Try to save the background PDF template file, especially save the PDF as PDF/A for Acrobat 1.4 or Acrobat 5.
What kind of variables are available in AdvancedInvoiceLayout configuration?
For salutations, footer columns and other free texts in the Magento PDF invoices, shipments and creditmemos, the following variables are available in System > Configuration > AdvancedInvoiceLayout.

Please note: Simple existence of a variable can be checked with {{depend shipping_date}}, negations can be used with {{if is_shipment}}{{else}}No Shipment{{/if}}.
{{var increment_id}}Invoice/Shipment/Creditmemo Increment Id
{{var customer_id}}Customer Id
{{var order.getIncrementId()}}Order Id (all other order attributes can also be accessed with the order object)
{{var increment_id}}Invoice/Shipment/Creditmemo Increment Id
{{depend is_invoice}}
Text only for invoices
"Text only for invoices" will only be shown on invoice PDFs.
{{depend is_shipment}}
Text only for shipments
"Text only for shipments" will only be shown on shipment PDFs.
{{depend is_creditmemo}}
Text only for creditmemos
"Text only for creditmemos" will only be shown on creditmemo PDFs.
{{var billing_address}}Billing Address of Order (formatting can be configured)
{{var shipping_address}}Shipping Address of Order (formatting can be configured)
{{date}}Date of invoice/shipment/creditmemo creation (formatted in your locale)
{{date+X}}Date of invoice/shipment/creditmemo creation plus specified number of days, e.g. for specifying due/delivery dates.
(Replace "X" with number of days)
{{var prefix}}Customer Prefix
{{var firstname}}Customer Firstname
{{var lastname}}Customer Lastname
{{var shipping_date}}The date of the first shipment (if any)
{{var payment_method.getTitle()}}The payment method title
{{if payment_method_purchaseorder}}
Only for invoices with payment method purchase order.
{{else}}For all other payment methods.{{/if}}
With this statement you can insert text that is dependent on the payment method, in this example purchaseorder. Just replace the text "purchaseorder" with your payment method code, e.g. "checkmo", "banktransfer", "payone", ..

If you have the extension Firegento_MageSetup installed the following additional variables are available:

{{var merchant_tax_number}}The configured tax number of the merchant
{{var merchant_vat_number}}The configured vat number of the merchant
{{var bank_account}}The configured bank account
{{var bank_code_number}}The configured bank code number
{{var bank_name}}The configured bank name
{{var swift}}The configured swift number
{{var iban}}The configured iban number
Which data should I submit for a support request to vianetz?

Please send us the following data to help you answer your support request.

  • used extension version (e.g. AdvancedInvoiceLayout 2.0.13)
    You can find the extension version in the configuration section e.g. in System > Configuration > AdvancedInvoiceLayout
  • domain on which you are using the extension and which produces the problem
  • Magento version

Furthermore if we should support you within our installation support, please provide us with the following details:

  • FTP/SSH access (username, password and path to Magento installation directory)
  • Magento Backend access (username, password and URL)

Please verify that all access data is working properly, especially if the Magento user has the correct group to login and view all relevant areas and the FTP user has write access to all folders of the Magento installation.
All data is kept confidentially.

Which domain name should I type in?

Please specify your exact production domain name of your Magento installation, i.e. including www. (if exists) and without leading http://.


You have a question that is not listed here?