Skip to content

Fix text overlap in sales PDFs #2779

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

Conversation

CNanninga
Copy link

In Magento\Sales\Model\Order\Pdf\AbstractPdf::insertOrder, the current vertical coordinate ($top) is advanced 30 units for the order ID, which leaves space above it for the document ID (shipment, invoice, etc) to be printed above it. For the next text to be printed, order date, the vertical coordinate is advanced another 15 units to put it under order ID. However, printing of order ID can be disabled in Store Configuration, and if this setting is off, order date is printed on its own, with only the 15 units change in the vertical coordinate. This results in the order date text overlapping the eventual placement of the document ID.

To fix this, the vertical coordinate is being advanced appropriately if the order ID is not being printed, before printing the order date.

@KrystynaKabannyk
Copy link

Hello @CNanninga, can you please update the code and cover it by Travis tests?

@NadiyaS
Copy link
Contributor

NadiyaS commented May 10, 2016

Hi @CNanninga,
Thank you for contribution. Please fix failing builds.
Internal ticket number MAGETWO-47204.

@NadiyaS NadiyaS added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label May 10, 2016
@vasiliyseleznev vasiliyseleznev removed the CS label Aug 3, 2016
@vkorotun vkorotun added Component: Sales bugfix and removed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Aug 3, 2016
@sshrewz sshrewz added the linked label Aug 11, 2016
@vkorotun vkorotun added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development and removed linked labels Aug 22, 2016
@SerhiyShkolyarenko
Copy link
Contributor

Closing PR as not updated more than 14 days.

magento-engcom-team pushed a commit that referenced this pull request Jul 2, 2018
[Plankton]: Merge 2.2.5 Release into 2.2-develop Branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Component: Sales Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: accept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants