As recommended by Hewlett Packard:
1-----1
2-----3
3-----2
5&6>-----20
7-----7
20-----<5&6
(The 25-pin to 25-pin Hewlett Packard part number for this cable is 17255D.)