Skip to main content
14 votes

Magento2: How to enable pdf on wysiwyg to upload attachments to products?

I have made a simple module to allow additional file types in the WYSIWYG editor. This module is available on GitHub https://github.com/experius/Magento-2-Module-Experius-WysiwygDownloads
Mr. Lewis's user avatar
  • 1,941
12 votes
Accepted

How to add and use TCPDF in magento 2

Try to run following command from M2 root directory composer require tecnickcom/tcpdf After install, use following way to create new PDF document tcpdf // create new PDF document $pdf = new \TCPDF(...
Sohel Rana's user avatar
8 votes
Accepted

Magento 2: How to add footer in pdf invoice?

For pdf, Pdf Starts Calculation from Bottom-Left Corner of Page and by default is measured in points. Start with X and Y axis at left bottom page. We have to set based on our requirements set $this->...
Rakesh Jesadiya's user avatar
8 votes
Accepted

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

Override AbstractPdf.php vendor\magento\module-sales\Model\Order\Pdf\AbstractPdf.php Go To Line number 397 (protected function insertOrder(&$page, $obj, $putOrderId = true)) & after put ...
Shorabh's user avatar
  • 1,508
7 votes
Accepted

What PDF plugin does Magento use to generate invoices?

Magento does not use any plugin to generate the pdfs. It uses Zend_Pdf. You can take a look at all the classes in here and see how it's done. Unfortunately Zend_Pdf is not something magical. It ...
Marius's user avatar
  • 198k
7 votes
Accepted

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

Place below code in your module controller for create and download PDF in Magento-2 and for more information follow this link $pdf = new \Zend_Pdf(); //Create new PDF file $page = $pdf->newPage(\...
BornCoder's user avatar
  • 1,518
7 votes

Magento 2.3: Add Attachment with email (Magento 2.3 use zendframework 2)

Try this way Some of the functionalities in Magento 2.3.x is different from previous version. The reason is that in most cases the 2.3.x framework uses Zend Framework 2 (ZF2) and almost totally ...
Msquare's user avatar
  • 9,183
6 votes
Accepted

Where does Magento store Pdf Invoices?

Magento doesn't store PDF files, it generates PDF on demand. It keeps all the required data in different tables and compose the PDF based on configurations and PDF template.
Aman Srivastava's user avatar
6 votes
Accepted

Rearrange the position of subtotal,shipment,tax in pdf invoice magento 2

The sorting of the totals in the pdf is driven by the sort order assigned in the pdf.xml files. To for example change the sort order of tax create a new custom module and place into it the following ...
Kristof at Fooman's user avatar
5 votes

Magento 2 : How to edit invoice PDF

You can override this file and do your change which you want in PDF vendor/magento/module-sales/Model/Order/Pdf/AbstractPdf.php
Ashish Jagnani's user avatar
5 votes
Accepted

How to change save path of PDF files in magento 2

You can do this in 2 ways: 1.The easiest way is to add in the file name the path, for example: return $this->fileFactory->create( 'custom/path/ . 'order' . $date . '.pdf', $pdf->...
Catalin Ionita's user avatar
5 votes

Add new mass action in order grid in magento 1.9

Flow below steps Step:1 Create file Ar_Custom.xml at location app\etc\modules and add below code <?xml version="1.0"?> <config> <modules> <Ar_Custom> ...
Abdul's user avatar
  • 9,701
5 votes

Magento 2 change Invoice PDF Font and Add logo and mailing Address in Footer

I have tried with module https://github.com/EaDesgin/magento2-pdf-generator2 but this module very complex and provide features if you buy it.I have not used this module and decide to make custom ...
akgola's user avatar
  • 2,967
5 votes

How to start a download in Magento 2?

Should see good examples: vendor/magento/module-sales/Controller/Adminhtml/Order/Pdfinvoices.php vendor/magento/module-sales/Controller/Adminhtml/Order/Pdfshipments.php We should use \Magento\...
Khoa TruongDinh's user avatar
5 votes
Accepted

Automatically generate invoice pdf and save to server when invoice is created

I don't think there is something "out-of-the-box" in Magento 2 for this. But you can easily create an observer for the event sales_order_invoice_register. This event is called after a new invoice is ...
HelgeB's user avatar
  • 4,531
4 votes

Magento2: How to enable pdf on wysiwyg to upload attachments to products?

i stumbled upon the same problem und came up with an out-of-the-box solution, that only requires ftp/sftp-access: upload an pdf-icon (something like ) into a folder (named "pdf" for example) upload ...
EarlBromStyle's user avatar
4 votes

Magento2: How to enable pdf on wysiwyg to upload attachments to products?

Create a di.xml in a custom module and paste the below code in the di.xml. This will allow the user to upload pdf in admin WYSIWYG editor. <type name="Magento\Cms\Model\Wysiwyg\Images\Storage"> ...
Rejoe's user avatar
  • 106
4 votes

How to customise invoice pdf layout in magento2?

For customization or changing layout of pdf invoice we use zend framework's library functions and we need to override some files like: Magento\Sales\Model\Order\Pdf\Invoice Magento\Sales\Model\Order\...
Deepak's user avatar
  • 81
4 votes
Accepted

Magento 2 - How to customize packing slip pdf print-out

To edit the packing list, or any other PDF docs such as invoice you need to override the files contained within Magento\Sales\Model\Order\Pdf For example if wanted to add the price to the packing ...
tim.baker's user avatar
  • 853
4 votes
Accepted

Magento PDF Print out Totals Sort order

Pdf Totals do not have a nice User Interface to change how they are sorted. The sort_order is determined by the etc/pdf.xml files. For example in /vendor/magento/module-sales/etc/pdf.xml you'll find ...
Kristof at Fooman's user avatar
4 votes
Accepted

How to create the download link?

For download PDF : <a href="{{media url="pdf/1.pdf"}}" download>Please download PDF</a> For view PDF : <a href="{{media url="pdf/1.pdf"}}" target="_blank">Please download PDF</...
Rohan Hapani's user avatar
  • 17.5k
4 votes
Accepted

how to edit Invoice pdf in magento 2.3

override of the abstract class in app\code{Vendor}\Module\Model\Order\Pdf\Invoice.php In my case i'm hide that 'red boarded table and update below function insertOrderCustom and adjust element ...
Shafeel Sha's user avatar
  • 1,395
4 votes
Accepted

How create Custom Pdf in magento 2 Like invoice , Shipment

You can check below link 1) https://meetanshi.com/blog/generate-pdf-programmatically-magento-2/ 2) Magento 2: Convert HTML code into PDF file and Download? 3) https://webkul.com/blog/generate-pdf-...
Limbani Himanshu's user avatar
3 votes

Magento 2: How to add footer in pdf invoice?

The x and y coordinate in Pdf aren't easy, we should calcuate by ourself. First of all, we need to override the getPdf method of Invoice Pdf Module/Vendor/Model/Order/Pdf/Invoice.php public ...
Khoa TruongDinh's user avatar
3 votes

Magento2: How to enable pdf on wysiwyg to upload attachments to products?

You can do it by adding "pdf" in the allowed extension section under vendor/magento/module-cms/etc/di.xml like below: <item name="allowed" xsi:type="array"> <item name="jpg" xsi:type="...
Varun Jyothi's user avatar
3 votes

Hide "Grand Total (Excl.Tax)" and "Tax" in order email

Just go to Magento Admin, then: System -> Configuration -> SALES (left panel) -> Tax -> Orders, Invoices, Credit Memos Display Settings -> Include Tax In Grand Total -> Choose 'No' The order ...
y.c's user avatar
  • 31
3 votes

how to change PDF invoice layout

I have used the above answers with a combination of Zend_Pdf module (https://framework.zend.com/manual/1.12/en/zend.pdf.usage.html) to create some extra space and lines between the items in the Pdf ...
yaniv Jacobson's user avatar
3 votes

What PDF plugin does Magento use to generate invoices?

By default magento using ZEND_PDF to customization on pdf invoice,order and shipment. You have to refer link for more customization of your task, You can start from here, Zend Pdf Customization ...
Rakesh Jesadiya's user avatar
3 votes

What PDF plugin does Magento use to generate invoices?

By default magento uses Zend_Pdf here is sample fo creating your own pdf simple zend pdf file not generate in magento If you want to use third party library then i recommend use the tcpdf library ...
Fme Extensions's user avatar
3 votes
Accepted

What method is needed to get 'info_buyRequest' in Pdf\Items\Invoice\DefaultInvoice

As per the $item var_dump, $productOptions = unserialize($item->getProductOptions()); $infoByRequest = $productOptions['info_buyRequest']; Or $orderItem->getProductOptionByCode('info_buyRequest'...
Amit Maurya's user avatar
  • 2,871

Only top scored, non community-wiki answers of a minimum length are eligible