There was a really clever piece of software called ClickBooks, from a company called Blue Squirrel, that would assemble the pages of a booklet any way you wanted, simplex, duplex, 2 up, 4 up, and on and on. It was quite inexpensive. Try www.bluesquirrel.com. Depending on the situation, particularly if you are making a booklet, two pages per side duplex,
the total number of pages in the document dictates what specific pages need to be on each sheet. The way Blue Squirrel dealt with this was to make every page a raster image and then the page ordering was rather simple.
In a PCL context, if your PCL code has scaled the page down to quarter size, then you could issue simple sheet offset commands before each page to position it on the sheet. If your intent is to print simplex, but to fold the sheet into "quarters", then two of the pages need to be printed upside down. That makes the raster image of the page an attractive option.