Well, one is supposed to actually walk the last 100 km. in order to receive a Compostela.
One can take a taxi/bus/train before that, but not during the last 100 km.
But, if you've walked all the way from St. Jean (or Pamplona, Burgos, Léon, ...) and have collected your daily stamps untill (for example) O Pedrouzo, no one in the pilgrim office will be able to determine if you have actually walked those last 19 km.
Some might say this would be cheating, but I don't have an opinion about that (I don't know the circumstances you're in).
So no judgement from this side...