Skip to content

[Backport] Remove PDF files after generation #17500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

vasilii-b
Copy link

@vasilii-b vasilii-b commented Aug 10, 2018

Description

Upon invoice/packingslip/credit memo printing the system generates a PDF file directly in the var directory. I see no reason for keeping these files since they are not accessible publicly via web (sharing purpose). There's no "reuse" purpose as well since on every print action a new file with a new filename is being generated.
This PR provides a logic for removing a PDF file once it's generated.
Currently, it's implemented only within a scope of the invoice printing. Once we agree on the solution, I will adjust other places with PDF generation.

Original PR #16401

Fixed Issues (if relevant)

  1. Print pdf don't delete file in var folder #3535
  2. PDF invoices in /var folder #14517

Manual testing scenarios

  • Open an existing invoice in the admin panel.
  • Click the "Print" button.
  • You should have the invoice downloaded.
  • You should not have a generated PDF file in the var directory.

@magento-engcom-team magento-engcom-team added Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Component: Framework/App Component: Sales Release Line: 2.1 labels Aug 10, 2018
@vasilii-b vasilii-b requested review from phoenix128 and rogyar August 10, 2018 19:03
@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-2738 has been created to process this Pull Request

@sidolov
Copy link
Contributor

sidolov commented Aug 13, 2018

Hi @vasilii-b , please, fix integration tests issues

@sidolov
Copy link
Contributor

sidolov commented Aug 27, 2018

Hi @vasilii-b , I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for the collaboration!

@sidolov sidolov closed this Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants