I need to make an extension to generate order details page as a pdf file when I click in print pdf button.
help please
1 Answer
You can start to check how magento is building pdf order invoices in Magento\Sales\Model\Order\Pdf\Invoice
All you should need to do is to create a custom class that will extends Magento\Sales\Model\Order\Pdf\AbstractPdf
and where you will write anything you want in the pdf.
That's for the pdf creation part...to retrieve the order details, just go threw usual by repository and so on.
If this doesn't answer your question, please be more specific about where you are stuck.