---
title: "Magento 2: How to Add New Field at Order Total Block in Order PDF"
url: "https://magecomp.com/blog/magento-2-add-new-field-at-order-total-block-in-order-pdf/"
date: "2021-09-20T17:28:23+00:00"
modified: "2025-02-19T05:31:48+00:00"
author:
  name: "Dhiren Vasoya"
  url: "https://magecomp.com/"
categories:
  - "How To"
  - "Magento 2"
word_count: 453
reading_time: "3 min read"
summary: "Hello Magento Friends,"
description: "When a new field is added in order total block, it must be added in the order PDF. Learn more Magento 2: How to Add New Field at Order Total Block in Order PDF."
keywords: "How To, Magento 2"
language: "en"
schema_type: "Article"
related_posts:
  - title: "Best Magento 2 Payment Gateways (Latest 2026)"
    url: "https://magecomp.com/blog/best-magento-2-payment-gateways/"
  - title: "Magento 2: Create Separate Column for Additional Attribute While Export Product"
    url: "https://magecomp.com/blog/magento-2-create-separate-column-for-additional-attribute-while-export-product/"
  - title: "How to Fix &#8220;Uncaught Error: Class &#8216;Magento\Setup\Mvc\Bootstrap\InitParamListener&#8217; not found&#8221; Error After Upgrading to Magento 2.4.x?"
    url: "https://magecomp.com/blog/fix-class-magento-setup-mvc-bootstrap-initparamlistener-not-found-error/"
---

# Magento 2: How to Add New Field at Order Total Block in Order PDF

_Published: September 20, 2021_  
_Author: Dhiren Vasoya_  

![How to Add New Field at Order Total Block in Order PDF In M2](https://magecomp.com/blog/wp-content/uploads/2021/09/How-to-Add-New-Field-at-Order-Total-Block-in-Order-PDF-In-M2-1024x512.webp)

**Hello Magento Friends,**

Today’s subject is Magento 2: How to Add New Field at Order Total Block in Order PDF.
When an order is placed, Magento provides the option for customers to download an order PDF that contains all the details of the buyer, seller, and the product that is being purchased. However, you can add some custom fields to order PDF rather than the default format provided by Magento. Learn [**How to Change Order PDF Format in Magento 2**](https://magecomp.com/blog/change-order-pdf-format-magento-2/).
[![hyva theme development](https://magecomp.com/blog/wp-content/uploads/2025/02/hyva-theme-development-CTA-5.webp)](https://magecomp.com/services/hyva-theme-development/)

Sometimes we need to add some fields in order total and it should reflect in order PDF as well. For e.g, we are going to add a new tax, ABC TAX, and that will be displayed in order total in order view. But also need to add in order PDF which customers will download for their reference.
So, here I will explain how you can achieve it.
## Steps to Add New Field at Order Total Block in Order PDF in Magento 2:
Let us take an example, I have added ABC TAX
**Step 1:** Move to the below path
**app\code\Vendor\Extension\etc\pdf.xml**

Now add the code as follows
```
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Sales:etc/pdf_file.xsd">
  <totals>
    <total name="abc">
      <title translate="true">ABC TAX</title>
      <source_field>abc_tax</source_field> // it’s Your Database Field Name
      <display_zero>false</display_zero> // If your column has 0 Value then it will not display in Frontend
      <sort_order>550</sort_order> // it will decide where you want to display your field in total block , for e.g after sub total, before grand total etc.
	<font_size>7</font_size> // to give font size.
    <model>Class_Name</model> // to customize the value you can use model class.
    </total>
   <amount_prefix>hello</amount_prefix> // you cann add profiex before amount
  </totals>
</config>
```

Still, if you want more understanding and customization, you need to understand the Magento core file. Here is the path,
**vendor\Magento\Sales\Model\Order\Pdf\Config\Converter.php**

[![Magento version upgrade](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-2-Version-Upgrade-CTA-2-2.webp)](https://magecomp.com/services/magento-upgrade-services/)

To view more tag, you need to check out the following file
**vendor\magento\module-sales\etc\pdf_files.xsd**

## Conclusion:
Hence, this way you can Add New Field at Order Total Block in Order PDF in Magento 2. In case of any difficulty share the issue with me via the comment section. Stay in touch with us so that you do not miss out on any important Magento solution.
[![Magento 2 Speed & Performance Optimization Services](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-2-Speed-Performance-Optimization-Services-CTA-3.webp)](https://magecomp.com/magento-performance-optimization.html)

**Happy Coding!**


---

_View the original post at: [https://magecomp.com/blog/magento-2-add-new-field-at-order-total-block-in-order-pdf/](https://magecomp.com/blog/magento-2-add-new-field-at-order-total-block-in-order-pdf/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-08-25 18:32:11 UTC_  
