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
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(...
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->...
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 ...
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 ...
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(\...
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 ...
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.
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 ...
5
votes
How to save the PDF file into Magento root folder
This
$this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s'). '.pdf', $pdf->render(), 'application/pdf');
would send it to the browser. The below ...
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
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->...
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>
...
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 ...
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\...
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 ...
4
votes
Accepted
Remove Coupon Code from invoice
You can rewrite the method _initTotals from the block Mage_Adminhtml_Block_Sales_Order_Invoice_Totals and make it look like this:
protected function _initTotals()
{
$this->getSource()->...
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 ...
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">
...
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\...
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 ...
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
...
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</...
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 ...
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-...
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 ...
3
votes
Accepted
simple zend pdf file not generate in magento
You should add return value as this code below:
return $this->_prepareDownloadResponse ( 'test.pdf', $pdf->render (), 'application/pdf' );
3
votes
Override Adminhtml Translation file with Module
follow this tutorial.add your translation file app/locale/en_US/ here. you can add this for frontend
<frontend>
<translate>
<modules>
<...
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 ...
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="...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
pdf × 405invoice × 169
magento-1.9 × 127
magento2 × 112
orders × 22
zend-framework × 22
magento-1.8 × 18
magento-2.1 × 16
invoice-pdf × 16
print × 15
magento2.3 × 14
email × 14
custom × 13
tax × 13
totals × 13
magento-1.7 × 11
php × 11
sales-order × 11
shipment × 10
product × 9
extensions × 9
admin × 8
download × 7
module × 6
magento2.2 × 6