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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Unable to add PDF as attachment

So I am using magento 2.4.6 and have created a PDF that customer can either download or email. The PDF is created and downlaoded successfully. Below is my code which sends an email without PDF for now,...
0 votes
1 answer
23 views

Magento 2 : Change 'Shipping & Handling' label while print the order

I want to change the Label from 'Shipping & Handling' to 'Shipping Charges' while printing the pdf after order success. Can anyone help Thanks
0 votes
0 answers
26 views

Magento 2 : Invoice PDF Need Product Detail Customization

How can I add table structure to product section of the Invoice Pdf in Magento Invoice PDF?
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'); $...
2 votes
1 answer
100 views

Magento 2 : Print order pdf's error since upgrade to 2.4.7

I have upgrading to 2.4.7, after that I can no longer print any order pdf's, which is obviously problematic. Exception log below but I am not technical enough to know how to fix it! main.CRITICAL: ...
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 ...
0 votes
1 answer
45 views

Zend Equivalent class for Magento 2.4.6

We have updated our website to Magento 2.4.6. We are facing Zend issue with the following 1.Zend_Pdf pdf = new Zend_Pdf(); $page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4); //var_dump($page); 2....
0 votes
1 answer
1k views

PDF on WYSIWYG. How to enable it?

I have tried to enable the pdf extension in the editor this way https://developersushant.wordpress.com/2015/04/16/magento-enable-pdf-extension-on-wysiwyg/. Although, this file there is not in the ...
1 vote
1 answer
1k views

Button print order does not show

I have a Magento 1.9 and it does not show the button to print order pdf in orders. How I can enable this? Thanks
0 votes
1 answer
31 views

Middle name not showing in PDF print

I've got several orders with customers having a middle name. I want to include these in the PDF prints, but somehow it won't show. This is my current PDF address template: {{var firstname}} {{depend ...
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 &...
0 votes
0 answers
26 views

How to attach invoice pdf generate and send with custom email in magento 2.4.6

I would like to attach the invoice PDF to the custom email. I have searched through several links on Stack Exchange, but unfortunately, I have not been able to make any progress on this issue. I hope ...
0 votes
0 answers
22 views

Issue in creating pdf using fileFactory->create() in magento 2

I am pulling files from 3rd party server using apis and generating pdf files. My code is some thing like this. I Will update the sample code to explain my approach. foreach ($fileData['dataDocuments'][...
0 votes
1 answer
2k views

How to save PDF files in Magento 2?

I have a frontend form which consists of two fields. One is a PDF file uploader field. The second one is a ZIP file uploader field. Now how do I save these two fields in the database? In which ...
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.
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 ?
0 votes
2 answers
4k views

How to add custom product attribute in PDF invoice?

I am trying to add custom attribute , product(book) publisher name below product name in PDF invoice(like in image)& publisher is custom attribute created by me. I copied app/code/core/Mage/...
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,...
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 ...
0 votes
2 answers
405 views

How to change the favicon logo on the browser to open pdf files in Magento 2

I have checked on a few other websites and on my local version when i open the pdf file my mini icon changes. How i can open the pdf file but the icon remains the default on my website
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!
0 votes
2 answers
48 views

Want to get the products with their categories in PDF

I want to get the all products for all categories with the products details include image, size weight , price in one pdf Please help me how can I achieve this
0 votes
0 answers
36 views

How to compress PDF of invoice shipment and Creditmemo

In Magento 2.4.1 I developed below code to compress the PDF and it was working fine Recently I updated Magento to 2.4.6-p3 and now compression stoped working. app/code/Vendor/CompressPDF/etc.xml <...
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/...
0 votes
2 answers
348 views

How to allow access to a folder in Magento root?

I recently upgraded to Magento 2.4.6. I've always had a folder named "PS" with pdf files in my magento root but now I can't access it. I noticed that this line from RewriteRule . /pub/$0[L]* ...
0 votes
0 answers
76 views

Arabic invoice pdf issue Magento 2.4.5 showing as Arabic letters but not correct

Preconditions (*) Magento 2.4.5-develop The store should be in Arabic Steps to reproduce (*) Place an order in Arabic store Customer fill the address and name all in Arabic Login to the admin panel ...
1 vote
1 answer
505 views

Error creating Credit Memo PDF

I am using a custom invoice and order printout, most my clients want the classical "romainan communist invoice" look. It works fine for generating the invoice and order printouts, but when I try to ...
0 votes
2 answers
1k views

How to attach invoice pdf with invoice email

I would like to attach the invoice PDF to the invoice email. I have searched through several links on Stack Exchange, but unfortunately, I have not been able to make any progress on this issue. I am ...
2 votes
4 answers
4k views

Magento 2, add `company's name` in invoice PDF file?

Using Magento 2.2, Invoice, PDF. I want to add new text block into pdf invoice. What do I need to do? Printed Order Invoice
0 votes
0 answers
18 views

Create custom invoice using default pdf with additional option in admin to download

I need to create a custom invoice using the default pdf class having an additional option in admin/orders download as "Invoice with vat" I did create a module using code from the following ...
0 votes
2 answers
130 views

Retrieve Product Image in PDF

I have a custom Magento 2 Invoice PDF template. I manage to get all of the order/invoice info including the product image url but as soon as this is included in the img tag it is not displayed. ...
2 votes
3 answers
10k views

Magento 2: How to add footer in pdf invoice?

How to add store information and terms and conditions inside pdf invoice file in magento 2? Also how to add footer in each page of pdf in magento 2 invoice pages?
0 votes
1 answer
163 views

How to save Magento 2 invoice PDF file with order ID instead of date?

When I print any invoice in Magento 2 the pdf save according to the current date I am saving it as for example invoice2023-05-10_05-58-26.pdf Instead, I wanted to save this pdf with order id like ...
2 votes
2 answers
3k views

How to add custom total row in Invoice PDF

I added pdf.xml in custom modules etc folder. But it is not reflecting in Invoice PDF. I have debug and found that in the class \Magento\Sales\Model\Order\Pdf\AbstractPdf, on line no. 676 I get custom ...
0 votes
1 answer
87 views

Magento 2 How add PDF Uploader to UI Component?

How do I add a PDF uploader to the ui component? I could find how to add an image uploader, but I can't find how to do it for pdf files.
1 vote
2 answers
1k views

How to get product image & remove background color on PDF invoice Magento 2.x?

I need help to customize the Magento 2.x PDF invoice for Print. I want to remove the Black color from the invoice. Please check on Attached image below. I want to add product image on PDF invoice. ...
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 ...
0 votes
1 answer
180 views

Magento2 Read PDF data

Magento2 How can I read data from PDF file. The product data is in the form of table inside a PDF file. I need get the data & then make some changes
0 votes
1 answer
1k views

Print Magento Invoice Data To TCPDF File

I have followed the instruction in the link -> TCPDF With Magento, now I want to call the TCPDF library from Invoice.php file at app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php because I want to ...
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'); $...
0 votes
0 answers
68 views

magento2 product attribute name and value generate in pdf format on detail page?

getSkU(); ?> getName(); ?> getPrice(); ?> getShortDescription(); ?> getDescription(); ?> Download Data sheet
0 votes
1 answer
723 views

magento2.4 how to upload Pdf file

How we can upload the PDF file in magento2.4 from admin module? We are upload PDF in backed admin its not support magento2.4
0 votes
2 answers
1k views

Edit creditmemo template pdf

I need to edit the pdf creditmemo generated from backend with the print button. I don't find the template. What is the path?
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/...
1 vote
2 answers
2k views

How create Custom Pdf in magento 2 Like invoice , Shipment [duplicate]

I want to create custom pdf with custom text or media can anyone suggestion me any best link or some help Thanks
2 votes
5 answers
13k views

Magento 2: Convert HTML code into PDF file and Download?

In my custom module, I have HTML code and I want to convert HTML code into PDF and after conversion download PDF. Please suggest me Magento-2 default functions or classes for Create PDF and Download.
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(\...
8 votes
4 answers
1k views

What PDF plugin does Magento use to generate invoices?

I need to provide an option for sellers/vendors to download their order information like name, sku, price, qty, etc. in PDF format on a custom page. I am planning to use any PDF plugin as mentioned ...
8 votes
4 answers
7k views

Magento2: How to create a PDF in a custom module

I would like to generate a custom pdf upon sale and attach it to the sales email all within a custom module. I think I need to extend Magento\Sales\Model\Order\Pdf\AbstractPdf to generate the pdf but ...
0 votes
1 answer
177 views

Zend Pdf round corners in rectangle section

I wrote the below code to show rectangle in pdf file $page->setFillColor(new \Zend_Pdf_Color_GrayScale(0.92)); $page->setLineColor(new \Zend_Pdf_Color_GrayScale(0.92)); $...

1
2 3 4 5
9