Binds and caps interactive surfaces on P pilus subunits to prevent them from participating in non-productive interactions. Facilitates the import of P pilus subunits into the periplasm, probably also facilitates their folding (PubMed:9351822). Chaperone-subunit complexes are then targeted to the PapC outer membrane usher where the chaperone must uncap from the subunits. Coexpression of this chaperone with individual, otherwise toxic, P pilus subunits (tested with PapA, PapE and PapG) suppresses their growth inhibitory phenotype (PubMed:9351822). Interacts with substrates PapG and PapK. PapD donates its G1 beta strand to complete the Ig fold of PapK (donor strand complementation). Belongs to the periplasmic pilus chaperone family.