Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [pdf]

Denotes questions related to PDF management and generation in Magento.

152 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6 votes
0 answers
981 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 ...
AWongMedia's user avatar
4 votes
2 answers
2k 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.
Hitesh Agrawal's user avatar
4 votes
2 answers
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 ...
Mihai Cata's user avatar
3 votes
1 answer
346 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 . ...
sumeet bajaj's user avatar
  • 1,296
3 votes
0 answers
621 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,...
DaFunkyAlex's user avatar
3 votes
0 answers
157 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 ...
Ashleigh Sims's user avatar
3 votes
1 answer
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 ?
ron24's user avatar
  • 131
3 votes
0 answers
329 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 ...
Garry's user avatar
  • 267
3 votes
1 answer
1k 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/...
Attila Naghi's user avatar
2 votes
0 answers
198 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 ...
Pratik Navapara's user avatar
2 votes
1 answer
79 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!
Ghadawi's user avatar
  • 21
2 votes
0 answers
100 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.
alexcr's user avatar
  • 1,487
2 votes
0 answers
121 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 ...
Radu Marinescu's user avatar
2 votes
0 answers
362 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\...
Brian N's user avatar
  • 931
2 votes
0 answers
1k views

Add New Page to an invoice PDF

I want to add custom image in a invoice pdf. The image to display is from my custom table based on order id. I am able to add the image in pdf using the below code. app/code/Vendor/Module/etc/di.xml &...
Vindhuja's user avatar
  • 1,395
2 votes
0 answers
51 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 ...
Ronak's user avatar
  • 797
2 votes
1 answer
1k 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 ...
Hitesh Vaghasiya's user avatar
2 votes
0 answers
370 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,...
Vivek Kumar's user avatar
  • 5,655
2 votes
0 answers
902 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 ...
Soeb Safi's user avatar
  • 313
2 votes
1 answer
582 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.
shankar boss's user avatar
  • 1,453
2 votes
1 answer
3k 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,...
Sunil kumar m's user avatar
2 votes
2 answers
681 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. ...
Adrian Gallego Castellanos's user avatar
2 votes
0 answers
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 ...
Susi Cox's user avatar
2 votes
0 answers
41 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. ...
Dene Wilby's user avatar
2 votes
0 answers
84 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 ...
ReDesigned's user avatar
1 vote
1 answer
33 views

How to change of the packingslip pdf file name (Shipment) with the shipping ID generated from admin?

Use di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/...
Shiv Om Mishra's user avatar
1 vote
0 answers
143 views

Magento 2 Failed to load PDF document in chrome browser

Error Screenshot: https://i.sstatic.net/uDJ5c.png Error: Failed to load PDF document. Here is the code: <?php namespace Vendor\Extension\Controller; use Magento\Framework\App\Response\Http as ...
Anil Makwana's user avatar
1 vote
0 answers
161 views

magento2 image add in pdf how to? this code not working for me

$post = $this->getRequest()->getParam('sku'); $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $helperImport = $objectManager->get('\Magento\Catalog\Helper\Image'); $...
milan's user avatar
  • 21
1 vote
0 answers
144 views

Magento 2: image issue in jspdf

I am using jspdf library to generate pdf and I am unable to print images on the pdf. here is my code: require(['jquery','jsPDF'], function ($,jsPDF) { var logo = 'https://rugs.a2hosted.com/...
mechanic's user avatar
  • 440
1 vote
0 answers
242 views

print order details pdf in order detail page

I need to add a print button to the order detail page so once we click on it we have the same information in a downloaded pdf format
sara ben's user avatar
1 vote
1 answer
42 views

Magento2.4.2 own module class does not appear in generated (no error while setup:ci:compile)

sorry to bother but I'm really stuck with a strange problem. My goal is to have the invoice PDF changed but the class I've created to do this (which is currently a bunch of code from another guy) does ...
daill's user avatar
  • 11
1 vote
1 answer
2k views

Magento 2: Show whole HTML code(phtml file code) into PDF file and Download with the use of DOM PDF?

I have tried to do it with zend pdf but i am not able to show whole html content with the use of zend pdf. If i want to display content of cms block , then i am not able to do it with Zend PDF. I have ...
ZealousWeb's user avatar
  • 2,088
1 vote
0 answers
237 views

Magento 2 - How to customize Shipping Label pdf print-out

I want to change the design and layout of my print shipping label pdf print-outs to make a simple and clean print for the employes to work through. Is there any extension / tutorial / anything else ...
Pawankumar's user avatar
1 vote
0 answers
193 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 ...
Hemangi Patel's user avatar
1 vote
1 answer
58 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 &...
Brian N's user avatar
  • 931
1 vote
1 answer
271 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 ...
ElDeray's user avatar
  • 11
1 vote
0 answers
205 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 ...
Vinod Kumar's user avatar
  • 2,065
1 vote
1 answer
433 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'); $...
sumeet bajaj's user avatar
  • 1,296
1 vote
2 answers
343 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?
Jazz's user avatar
  • 151
1 vote
0 answers
29 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!
egg's user avatar
  • 499
1 vote
0 answers
1k 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(\...
Adarsh Shukla's user avatar
1 vote
0 answers
338 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 ...
Sarfaraj Sipai's user avatar
1 vote
0 answers
230 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 ...
Ashish Jagnani's user avatar
1 vote
0 answers
134 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 ...
Bhakti Thakkar's user avatar
1 vote
0 answers
50 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
Altravista's user avatar
1 vote
1 answer
901 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 ...
baronebirra's user avatar
1 vote
1 answer
537 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 ...
Hiren Patel's user avatar
1 vote
1 answer
63 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 ...
Phil Kay's user avatar
1 vote
1 answer
143 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 ...
Bojjaiah's user avatar
  • 3,762
1 vote
1 answer
1k 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?
Sergiu Turus's user avatar