I want to rearrange the position of subtotal,shipment,tax in pdf invoice. enter image description here

I want to move "tax" before grand total.

1 Answer 1


The sorting of the totals in the pdf is driven by the sort order assigned in the pdf.xml files. To for example change the sort order of tax create a new custom module and place into it the following etc/pdf.xml file

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        <total name="tax">

You also want to provide a sequence in your module so that it gets sorted after Magento_Tax.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.