We report generation of high-modulation-depth photonic millimeter-wave (MMW) waveforms by applying line-by-line pulse shaping on a phase-modulated continuous-wave frequency comb. The optimized 20 and 100 GHz optical waveforms are then converted into electrical MMW signals using a near-ballistic uni-traveling-carrier photodiode (NBUTC-PD). A 7.4 dB MMW power enhancement is experimentally achieved by using 2.6 ps optimized pulses at a 100 GHz repetition rate, as compared with excitation by a conventional sinusoidal signal for the NBUTC-PD operated at the same photocurrent. This is in qualitative agreement with a theoretical analysis of spectral power enhancement by optical short pulses comprised of equi-amplitude frequency lines over sinusoidal excitation.