Hello everybody!
I am trying to get a Barcode in the Center head [chead] on every page like this work

First I decided to put the barcode inside a header. This worked but
The code I had for the barcode:
\documentclass[paper=a4,12pt]{article}
\usepackage{fancyhdr}
%fancyhdr hiya li kadir khat asfal wa a3la waraka
\usepackage{lipsum}
\usepackage{pstricks}
\usepackage{pst-barcode}
\usepackage{graphicx}
\usepackage[right=2cm,left=2cm,top=1.6cm,bottom=2cm]{geometry}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{polyglossia}
\setdefaultlanguage[calendar=gregorian,locale=morocco]{arabic}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.4,]{Amiri}
\newfontfamily\arabicfontsf[Script=Arabic,Scale=1.4,]{Amiri}
\newfontfamily\khat[Script=Arabic,Scale=1.4,]{ae_Cortoba}
\setotherlanguage{french}
\parindent=0pt
\pagestyle{fancy}
%fancy tar9im wara9a
\renewcommand{\footrulewidth}{2pt}
\renewcommand{\headrulewidth}{2pt}
\lhead{تاك}
\chead{ \begin{pspicture}(50mm,30mm)
\psbarcode{978-3-86541-114}{includetext}{isbn}
\end{pspicture}}
\rhead{المستوى}
\lfoot{انتهى}
\cfoot{الصفحة
$ 1 $
من
$ 1 $}
\rfoot{اقلب الصفحة}
\mathversion{bold}
\begin{document}
\centerline{\textarabic{\khat وزارة التربية الوطنية والتعليم الأولي و الرياضة}}
الثانوية الاعدادية الزهراء
\hfill
%hfill taktab mo9abil
السنة الدراسية :
$2022-2021$\\
المستوى : ثانية علوم تجريبية
\hfill
المدة :
$1$
سا\\
\rule{\textwidth}{2pt}
\centerline{الفرض الأول في مادة : الرياضيات}\\
\rule{\textwidth}{2pt}\\
\underline{التمرين الأول :
($ 05 $
نقط)}\\
عين الكتابة العلمية للعدد :
$ 0.01234567 $\\
\begin{minipage}{10cm}
ليكن الشكل المقابل هو التمثيل المبياني لدالة
$ f $
معرفة بالعبارة :
$ f(x)=x+1 $
\end{minipage}\hfill
\begin{minipage}{6cm}
\includegraphics[scale=0.6]{tex}
\end{minipage}\\
\underline{التمرين الثاني}\\
نص عربي\\
$ \mathop {\lim }\limits_{x \to + \infty } f(x) $
\lipsum
\end{document}
Any ideas
