Yes, applying for Portugal permanent residency via the D7 visa is possible. The D7 visa holder must reside in Portugal for five years as a legal resident and fulfill the eligibility requirements to apply for Portugal PR.