How to reposition cards in Browser?

Hi, I’ve created a script to export my flashcards as .PDF, but I’d like to change the presentation order once I export to PDF (not the order I’ve created the cards). Is it possible to change the exibition order of the notes? For example, I’d like card 1 to go up and card2 to go down

That depends on your script. Can you share the snippet for fetching the cards or notes?