Wa `alaykum As-Salamu waRahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
It is not permissible to consume foods, drinks and medicines that contain gelatin derived from the skin of pigs or other impure substances, especially when alternatives are available in the form of animals which Allah has permitted.
Answering your question, The Permanent Committee for Scholarly Research and Ifta’ in Saudi Arabia, issued the following fatwa:
If the gelatin is derived from something haram, such as pork or the skin, bones etc. of pigs, then it is haram.
“Prohibited to you are dead animals, blood, the flesh of swine…” (Al-Ma’idah 5:3)
The scholars are unanimously agreed that pig fat is included in this prohibition. If no haram substances or ingredients are involved in the production of gelatin, then there is nothing wrong with it.
Almighty Allah knows best.