You have a small chance of getting an enchanted book while fishing, however the chances are pretty low. On each roll, you will only have a 5% chance of picking up a treasure item. Within this 5% chance, there is only a 16.7% chance that the treasure item is an enchanted book. This means that the overall chance of you rolling an enchanted book while fishing is 0.8%.
Also, the enchantment you get from a fish enchanted book is random, so again, you’ll have to be lucky enough to find the repair enchantment this way.