Yes, this is achievable, but I would separate the quote generation logic from the standard Dynamics 365 Sales Export to PDF command.
The native Export to PDF functionality uses Dynamics 365's quote document generation and does not automatically execute a custom Power Automate flow to reorder quote lines before generating the PDF.
I would recommend one of these approaches:
1. Power Automate + Word template: Retrieve the quote and its quote lines, sort the lines using your custom sequence number, populate a Word template, convert it to PDF, and email or save the resulting document. This gives you control over line ordering and the final document layout.
2. Custom command bar button: Add a button such as Generate and Email Quote PDF using the modern command designer. The button can trigger a Power Automate flow or a custom API that generates the PDF with the required line ordering. Users can complete the process directly from the quote record without manually using Print Preview.
3. Custom document generation solution: If you need advanced formatting, complex pricing calculations, or consistent output across quotes, orders, and invoices, consider a dedicated document generation solution or a custom reporting service.
One important distinction: if users must continue using the existing native Export to PDF button, customizing that exact behavior is different from adding a new command. A custom button is generally the more maintainable option.
For your scenario, I would start with a custom command bar button that invokes a flow, sorts quotedetail records by the sequence column, generates the PDF, and then opens or emails the document. This preserves the standard functionality while providing the required row ordering.