Periodic slab generation for MD studies in gromacs

I want to prepare a periodic silica slab for MD studies in gromacs. I have generated the slab from the cleave option followed by vacuum slab generation and then supercell generation. The problem that I am facing is conversion of the the periodic lattice into a pdb file (as it is a non-periodic structure). Is there any way to convert the structure into the pdb file, with any script possibly or any other means?