Did they fly out the top of the pen or escape through the door then fly? Are you wondering how to get them back in, or keep them in in the future? If you need to keep them in for the future, netting the top of the pen if you haven't already would be relatively easy and cheap, plus it would add protection against hawks, eagles, etc. If they escaped through the door though, and you just need to get them in try setting out their favorite food, and slowly herd them back towards it.
They flew out the top. Yeah I will probably have to buy netting a lot of it! Their pen is 8 ft wide and 32 ft long. What kind of food do your mallards like? I am feeding mine Dumor chick/starter at the moment.