The calculated distance (air line) between Dobrovnik and Koper is approximately 147 miles respectively 237 kilometers.
By car or train, the actual journey to Koper is certainly longer, as only the direct route (as the crow flies) between Dobrovnik and Koper has been calculated here.