to the letter, literally
A sentença deveria ser aplicada ao pé da letra conforme o juiz determinou.
The sentence should be applied to the letter as the judge determined.
Ao pé da letra ("at the foot of the letter") means taking words in their strict, literal sense. Here pé ("foot") carries the old figurative meaning of "right next to" or "close beside," so to read something ao pé da letra is to stay right beside the written word, adding nothing of your own.
Source: Ciberdúvidas da Língua Portuguesa.
Falando's Idiom Trainer teaches you to recognize idiom meanings and create sentences using them, so you can speak like a Brazilian.