1

open admin panel and go to sales->invoice and select invoice and download PDF this issue is generated. i have check network show 500 error it is a permission issue hello everyone plz give me a solution. this problem ow to resolve in magneto 2

  • It maybe related to a custom module modifying the pdf generation. – Kennedy Mar 18 at 19:50
1

The problem will be in one of 3rd party extension which has pdf.xml file.

To solve this problem, run ssh command and find all pdf.xml files in your project. After that, open each 3rd extensions pdf.xml file and check, do < total > have one of the following child: title, title_source_field, font_size, amount_prefix

I fixed it by adding < title > tag.

<totals>
    <total name="extra_fee">
        <!-- I fixed it by adding <title> child -->
        <title>Extra fee</title>
        <!-- End of changes -->
        <source_field>extra_fee</source_field>
        <model>.....</model>
        <font_size>7</font_size>
        <display_zero>false</display_zero>
        <sort_order>600</sort_order>
    </total>    
</totals>
| improve this answer | |
0

Today i fix it. vendor/magento/module-sales/etc

the file is pdf.xsd

 <xs:complexType name="totalItemType">
    <xs:all>
        <xs:element name="title" type="totalTitleType" minOccurs="0"/>
        <xs:element name="source_field" type="fieldType" minOccurs="0"/>
        <xs:element name="title_source_field" type="fieldType" minOccurs="0"/>
        <xs:element name="font_size" type="xs:positiveInteger" minOccurs="0"/>
        <xs:element name="display_zero" type="xs:boolean" minOccurs="0"/>
        <xs:element name="sort_order" type="xs:nonNegativeInteger" minOccurs="0"/>
        <xs:element name="model" type="classNameType" minOccurs="0"/>
        <xs:element name="amount_prefix" type="xs:string" minOccurs="0"/>
    </xs:all>
    <xs:attribute name="name" type="xs:string" use="optional"/>
</xs:complexType>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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