You can, but it leaves a lot of questionable gray gack containing moisture and contaminates in the very bottom of the fork legs. I find it better to remove them, give them a complete flushing then refilling them off the bike.
Loosen the upper triple pinch bolts then remove the caps, springs and spacers while the fork legs are still on the bike. Unbolt the caliper and let it dangle then remove the front wheel and fender. Loosen the lower pinch bolts and slip the forks out of the trees, dump the old oil out, flush with some cheap ATF by cycling the fork legs by hand, fill and measure while they're still off the bike and re-assemble.
I can probably do all that in less time than it takes to do the siphon/flush, siphon/flush nonsense with a vacuum pump and it does a much more thorough job.
Do it whatever way you feel most comfortable with, but take the time to get it clean and get the measurement exact and equal in both legs. This may mean numerous flushings. Do you really wanna do that with a pump?