High-voltage dc transmission based on voltage-source converter (VSC-HVdc) is quickly increasing its power rating, and it can be the most appropriate link for the connection of offshore wind farms (OWFs) to the grid in many locations. This paper presents a steady-state operation model to calculate the optimal power transmission of an OWF connected to the grid through a VSC-HVdc link. The wind turbines are based on doubly fed induction generators (DFIGs), and a detailed model of the internal OWF grid is considered in the model. The objective of the optimization problem is to maximize the active power output of the OWF, i.e., the reduction of losses, by considering the optimal reactive power allocation while taking into account the restrictions imposed by the available wind power, the reactive power capability of the DFIG, the DC link model, and the operating conditions. Realistic simulations are performed to evaluate the proposed model and to execute optimal operation analyses. The results show the effectiveness of the proposed method and demonstrate the advantages of using the reactive control performed by DFIG to achieve the optimal operation of the VSC-HVdc.