Hello,
I had same situation and so I went to meet immigration consultants, since I had my legal study permit expiring 30 Dec, you can go ahead to apply for PGWP before its expiration which I did and now waiting for the work Permit. If your permit has been expired then you cannot apply for PGWP