Questions tagged [pdf]

Denotes questions related to PDF management and generation in Magento.

139 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
468 views

Magento 2: Invoice PDF Can't Complete Download on Customer End “Failed - Network Error”

I have an extension by MageSpaceX that creates PDFs for Invoice/Order PDF. It works fine on the Admin End, I can hit "Print PDF", and it generates it perfectly. Downloads it, and I can do whatever I ...
4
votes
2answers
652 views

How to get pdf file in response for Magento 2 rest api?

Currently Magento 2 is providing JSON and XML response in web REST API I want to include a custom response format PDF. So if any third-party will call our API then we can sen them PDF in response.
4
votes
1answer
685 views

Pdf xml in Magento 2?

When developing a payment fee, I want to add a surcharge fee to Pdf. I found the pdf.xml config. However, I don't know how it works. Can anyone help me to explain the config pdf xml. vendor/magento/...
3
votes
1answer
167 views

Magento2 : How to Translate words of order pdf like subtotal,grand total

Magento,How to Translate words of order pdf like subtotal,grand total,shipping & Handling etc... Where i have to work php files or phtml files or CSV ? i need to translate that words in arabic . ...
3
votes
0answers
244 views

Magento 2: PDF set page margins for Invoice

I added a footer to my invoices, this works fine. private function _insertFooter($page) { $this->_setFontRegular($page, 8); $this->y = 100; $page->drawLine(25, $this->y, 570,...
3
votes
0answers
100 views

Create a PDF with customer/order information for virtual product

I've setup products as "Virtual Products" because I don't ship anything so thought this would be the best product type. With that the option to attach downloadable PDF products. On sale of this ...
3
votes
1answer
1k views

Invoice PDF print Arabic Character?

I am having problem in Printing invoice when the costumer time Arabic Character in checkout. The Arabic word is become square charcter. Anyone knows possible alternative on this ?
3
votes
0answers
314 views

Invoice template changes not showing

I have changed my invoice template to add some footer text, this works fine. However recently I have been asked to change this text to correct a typo. This I have done but the change is not showing ...
2
votes
0answers
46 views

Magento2 how to display additional custom total value in shipment email

I have added a new custom cart total (e.g. Extra Fee) in my current project. I made it display on almost every page, email and pdf files. However, I can't able to find a way to display it in the ...
2
votes
0answers
55 views

Add the weight to the Magento 2 .pdf invoice

I'm using Magento 2.3.0 and I would like to add the products weight, or overall weight of the order on the .pdf invoice.
2
votes
0answers
37 views

How to change the PDF invoice list format, in Magento2?

I have managed to create a module, and overwrite the \Magento\Sales\Model\Order\Pdf\Invoice class, using the steps proposed by this answer: https://magento.stackexchange.com/a/241932/80959 My ...
2
votes
0answers
113 views

Refresh page after download PDF in custom module magento 2

Refresh page after download PDF in custom module magento 2. When the download is complete, the page is not f5. Please help me. My function public function createPDF(\Magento\Framework\Event\...
2
votes
0answers
42 views

Fooman EmailAttachment = 'Payment Methods' is blank on the emailed PDF but not on the manually created PDF for Magento 1

I have recently installed Fooman EmailAttachment module and my order email PDF doesn't display Payment Method information. Only payment method information is missing from Order PDF. Can anyone help ...
2
votes
0answers
235 views

Magento 2 : How to watermark pdf of a downloadable product?

Suppose a downloadable product has pdf uploaded as link and samples. How can i watermark that pdf in magento 2.1 with dynamic data like customer name . So , when user downloads it after order approval,...
2
votes
0answers
502 views

Unable to refresh the page after generating PDF file in order grid

We have kept one button in mass action in orders grid, upon clicking it should generate a PDF file, which is working fine, but after generating PDF the should refresh automatically. That's we are ...
2
votes
2answers
849 views

Add text to invoice

I want to add text to the pdf invoice in the marked arena (see photo). I'm using Magento version 1.9.2.1 How can I do this?
2
votes
1answer
505 views

Magento 2 Create Product Details pdf?

How can I create a pdf file with Product details and download it by clicking on download image in product list page in magento 2.Can anybody Help me on this.
2
votes
1answer
2k views

How to draw image from image source in Zendpdf in magento

I am trying to create a packing slip for delhivery. An APi from delhivery send the details of packing slip including the Barcode source. $barcodeImage = data:image/png;base64,...
2
votes
2answers
651 views

[Solved]Cannot override Pdf/Total/Default.php model

Good morning everybody! I have a problem trying to override the model app/code/core/Mage/Sales/Model/Order/Pdf/Total/Default.php with app/code/local/Mycompany/Sales/Model/Order/Pdf/Total/Default.php. ...
2
votes
0answers
1k views

Magento Send Transaction Email Template to PDF as Attachment

I can successfully send email with Transaction Email Template but i am not able to convert Transaction Email Template into pdf and send it as attachment in the same email. Any one can help to ...
2
votes
0answers
40 views

PDF invoice layout change / question

I'm trying to find out how I can modify the PDF invoice layout on Magento. All I need to do is shift the 'SHIP TO:' box a little to the right so that it prints correctly on the labels that we use. ...
2
votes
0answers
78 views

Product price calculation on order emails and pdfs

I have a client that needs to increase product prices using catalog price rules. Unfortunately Magento shortsightedly min() the catalog price rules wherever they are found. I managed to change this ...
2
votes
2answers
2k views

How to replace the subtotal including tax with subtotal excluding tax in the pdf invoice?

My pdf invoice show now the subtotal including tax, the tax, shipping taxes, and the grand total including taxes and i want to show the subtotal excluding tax instead of including tax. I tried to edit ...
2
votes
1answer
847 views

Adding Line Break in Invoice PDF

This is the content of my store contact address: text<br/> text2<br/> text3 I am getting this content in the Pdf/Abstract.php file, like: $storeAddress = Mage::getStoreConfig('general/...
1
vote
0answers
24 views

Magento 1.9 print invoice the characters are shown split and reverse

I have changed the font of pdf invoices to support Arabic characters, but the problem is the characters are split and reversed? Any suggested solution please Help!
1
vote
0answers
42 views

Send custom pdf in attachment in email in magento2.2.6

How to add PDF as attachment in magento 2.2.6 ? I have created code using an event "checkout_onepage_controller_success_action" to sends an email after place an order button click. 1) When ...
1
vote
1answer
36 views

How to use || or && in Email Template or PDF Template Magento 1.x

I want to use || in {{if}} I tryed like this but it not work, please help me {{if helper.eq(order.shipping_description, "abcd") || helper.eq(order.shipping_description, "dede") }} <p>abcd &...
1
vote
1answer
63 views

Missing words when create pdf invoice with chinese character

I am currently having a problem: Currently when I create an invoice in the backend in Chinese, my font is missing some characters that cannot be created. I tried searching for different fonts on ...
1
vote
0answers
52 views

Magento 2 Order print showing href links with content!

I have social links in footer in the website, and configured url in admin configuration for social icons. But when I am printing order PDF from customer account order view page then all links on the ...
1
vote
0answers
113 views

Magento 2: Use Zend_Pdf easily while making PDF file

How to make a dynamic PDF easily while sending an email with this PDF attachment using Zend_Pdf because of this type of code $page->drawText(__("Image"), $x + 60, $this->y-10, 'UTF-8'); $...
1
vote
2answers
296 views

Invalid Document Element 'total': Missing child element(s). Expected is one of ( title, title_source_field, font_size, amount_prefix ). in magento 2

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 ...
1
vote
2answers
203 views

Magento 2.3: How to attach a pdf file with new order mail?

I am using magento 2.3.1 I need to send a pdf with new order mail, I have already done that for magento 2.2.6 but that is not working with 2.3. Can any one help me with this?
1
vote
0answers
24 views

open PDF directly within Chrome

how can I open a PDF directly within Chrome, without having the "save as" option. Currently, my links with target="_self" still get opened as "save as". Any tips? Thanks!
1
vote
0answers
402 views

How to create PDF from HTML in Magento 2?

I am facing issue creating PDF file from HTML text stored in a variable. I have tried zendpdf but it directly prints tags also. Here's my code: $pdf = new \Zend_Pdf(); $page = $pdf->newPage(\...
1
vote
0answers
159 views

Magento2 : How to remove details from shipment print shipping label

I want to remove description from pdf file. it is generated from here. please check following path to print shipment file: From admin menu : Sales->Shipments->click any one shipments view link now ...
1
vote
0answers
114 views

Magento 2 : Print Quote Details

I want to print Quote detail's similar to print order from Cart page. Is it possible to print quote details along with quote item detail and quote amount detail. Please provide me the logic or code ...
1
vote
0answers
120 views

How to add pdf attribute in magento 2

I have created one attribute "text field" and added <a href="{{media url='wysiwyg/smartwave/porto/Data_sheets/1.pdf'}}" target="_blank">Kaifeng Products Overview </a> in text field but ...
1
vote
0answers
40 views

Override PDF invoice coupon discount

I cannot found function to override (and relative core magento file) for edit total invoice coupon discount I need to print discount value vat excluded
1
vote
1answer
617 views

Translate magento 2 pdf invoice

I installed the MagePlaza language Italian pack on Magento 2.2.3 and it works well, but some voice on the pdf invoice are not translated. I need to change the vat voice to partita iva. I created a ...
1
vote
1answer
399 views

How to upload file attribute for document in customer registration page and displayed document link in admin customer Edit page

I want to add upload document in customer registration page and display same document in admin customer account page.I have created input type file field and saved document in customer respective ...
1
vote
1answer
40 views

translation of customized pdfs doesn't work

I created a module called phil/pdfs to customize the pdf of magento_sales module. Everything works fine but the translation. Collecting the phrases with i18n tool returns all phrases I want to ...
1
vote
1answer
99 views

Plugin not working in live environment in Magento 2

I have overwritten the Tax class for IGST calculation customization. It's working fine on my local system. After I uploaded the live server it's not working, I don't know where anything I missed. For ...
1
vote
1answer
528 views

How to center logo in invoice PDF?

I'm trying to center the logo shown in my invoice PDF but I don't really know how to do this. Is there a .phtml template file where I can apply a css class or how do I center it?
1
vote
0answers
69 views

cant make pdf invoice when in production mode

When in development mode I can create pdf invoices just fine but when in production mode I get an error. Under sales > Invoices I'm clicking the "Print" button to get a pdf of a invoice (see link) ...
1
vote
0answers
867 views

Add a new subtotal per VAT rate to invoices for display only that does not affect the value of the invoice

I'm trying to add a subtotal per vat rate to our PDF invoices. I've followed numerous sets of instructions (which are broadly similar) such as these: https://www.mageplaza.com/how-add-custom-discount-...
1
vote
0answers
835 views

How to draw Product image in pdf in Magento 2

I want to put product image in pdf for that I have created on function with name Insertfunction and call it from getPdf. we have tried following code. public function getPdf($orders = []) { $...
1
vote
0answers
36 views

How to export current page as a PDF in magento?

i wants to export following Phtml page in PDF formate... <?php if ($this->helper('wishlist')->isAllow()) : ?> <div class="my-wishlist"> <div class="page-title title-buttons"&...
1
vote
1answer
531 views

magento 2, I need to add dompdf Library Without using composer in my extension

I have created an extension for HTML to PSD by using dompdf Library. I had tried to using composer and it's working fine. But I need this Library in my custom extension. When any user add extension ...
1
vote
0answers
116 views

How to send wishlist item quotation in PDF format via email to customer- Magento 1.9

I want to send the wishlist quotation in PDF format to the currently logged in customer. Magento has the option to share a wishlist, but it only lets you share with another recipient where as I would ...
1
vote
0answers
368 views

Magento 2 default invoice pdf language

I wonder that is there any way to set Magento default invoice pdf language different with Interface Locale in Account Setting?