This paper presents a continuous single-step route that permits preparation of a thermostable polymer/metal nanocomposite film and to combine different functional properties in a unique material. More precisely, palladium nanoparticles are in situ generated in a polyimide matrix thanks to a designed curing cycle which is applied to a polyamic acid/metal precursor solution cast on a glass plate. A metal-rich surface layer which is strongly bonded to the bulk film is formed in addition to homogeneously dispersed metal nanoparticles. This specific morphology leads to obtaining an optically reflective film. The metal nanoparticles act as gas diffusion barriers for helium, oxygen, and carbon dioxide; they induce a tortuosity effect which allows ...